home *** CD-ROM | disk | FTP | other *** search
/ Amiga Tools 4 / Amiga Tools 4.iso / tools / system-tools / zshell28 / zshell.doc < prev    next >
Text File  |  1996-02-26  |  130KB  |  2,944 lines

  1. ZShell-Documentation 2.8 (25.08.95)
  2. ----------------------------------------------------------------------------
  3.                     ________   ___         ___
  4.                    /____   /\ (___' |___| |__ '|    |
  5.                    \___/  / / ,___) |   | |___,|___,|___,
  6.                       /  / /____________    _____   _____
  7.                      /  / / \__________ \  /_____\ /__ _/
  8.                     /  / /__           \ \// /___/_\__ \
  9.                    /  /_____\           \_/  \_________/
  10.                    \________/
  11.        _________________________________________________________
  12.      _|                                                         |_
  13.     | |   ZShell v1.30 is Copyright © 1990,91 by Paul Hayter    | |
  14.     | | Update to v2.8 is Copyright © 1993-95 by Martin Gierich | |
  15.     | |________________________________________________________ | |
  16.     |__\|                                                     |/__|
  17.      \|                                                         |/
  18.              Titlepage created by Timothy D. Cochran (XMR)
  19.  
  20. If you have used another version of ZShell, please read Changes.
  21.  
  22. ============================================================================
  23. Contents
  24.  
  25. For those who never read the whole Documentation
  26. Introduction, Features and Concepts
  27.  
  28. Starting ZShell:
  29.   Starting from CLI/Shell
  30.   Starting from Workbench
  31.   Opening window on own screen
  32.   Starting using console handlers like KingCON
  33.   Starting from Hotkey-/Directory-Utilities
  34.   How to use CON:
  35.   Errormessages during starting
  36.   Several notes
  37.  
  38. General Usage:
  39.   History and Command Line Editing
  40.   Command Line Parser
  41.   Executing Commands
  42.  
  43.   Using Numbers
  44.   Wild Cards
  45.   Options
  46.   Redirecting Input/Output
  47.  
  48.   Anonymous Pipes
  49.   Filename Completion
  50.   Tips and Hints
  51.  
  52. Internal Commands:
  53.   Builtin Commands for Disk Management
  54.   Builtin Commands for Scripts and Controlling
  55.   Builtin Commands for Advanced Users
  56.  
  57. Past, Present and Future:
  58.   Changes                               ->Past
  59.   Known Problems                        ->Present
  60.   Possibilities for Future Improvements ->Future
  61.  
  62. Distribution
  63. Copyright
  64. Disclaimer
  65.  
  66. Credits
  67. Authors
  68. ============================================================================
  69. For those who never read the whole Documentation
  70.  
  71. Start the file called ZShell from Workbench or CLI (SHELL), or even
  72. better: Put the file ZShell in the C: directory and start the file ZSH.
  73. Now press the HELP key. Among lots of other information you see "TYPE HELP
  74. ? ...". Make sure that ZShell.doc is in the current directory or in S:
  75. and try that. You will see how to use the ONLINE HELP. Try to type
  76. "HELP HISTORY" to see how command line editing works. Execute the
  77. example startup file "ZStart" or put it into the S: drawer and
  78. have a look at it.
  79. Please send me your comment; my Internet-Adress is:
  80. uj3w@rz.uni-karlsruhe.de (Martin Gierich).
  81.  
  82. Things somewhere hidden in the documentation:
  83. * To avoid using an internal command or an alias, you can put a point
  84.   before it, eg. ".list libs:".
  85. * To complete a filename, type in a bit then press TAB.
  86. * If you use "config hide *.info", DIR and Filenamecompletion ignore Icons.
  87. * To start buffering output, use "review 20000"; press Shift+TAB to see it.
  88.   With it you can use ">m" to redirect to MORE, a bit like piping to MORE.
  89. * If you have OS3.0+, try "config colour 01111111".
  90. Aliases work different to them in normal Shell.
  91. * Use "prompt %n.%p>" to get a full path prompt with process number.
  92. * See FLAGS on how to configure some things you need.
  93.   With "flags icon on" you can switch on Iconifying.
  94. * Try "flags debug on" to debug your script-files and your aliases.
  95. * Try to drag Workbench-Icons into the ZShell window
  96. * See Features and Tips and Hints for more.
  97. ============================================================================
  98. Introduction
  99.  
  100. ZShell is a small, fast and powerful Shell.
  101. Have a look at Features to see the advantages.
  102. ZShell is tested with Kickstart 1.3 , 2.04 and 3.0 and should
  103. run also with other Kickstarts. There are no special requirements,
  104. but some things can only be used with Kickstart 2.0 or better.
  105. I tried to made usage similar to AmigaDOS. If you did not
  106. understand something, have a look at your AmigaDOS usermanual.
  107.  
  108. Used Abbreviations:
  109. OS2.0+ means Kickstart and Workbench versions are 2.0 or better
  110. OS1.3- means Kickstart and Workbench versions are 1.3 or older
  111. FNC means filename completion
  112. ============================================================================
  113. Concepts
  114.  
  115. I have heard that there is a Shell called "zsh" on UNICS-systems. ZShell
  116. has nothing to do with it, because it tries to be AmigaDOS compatible,
  117. not just another UNICS shell clone. The compatibility is, of course, not
  118. 100%, if you need that use the original AmigaDOS Shell. So ZShell has some
  119. differences, that give the special feeling of it.
  120.  
  121. The first main advantage of ZShell is its power/size ratio. In just 32K
  122. there are all often needed commands (like list,copy etc.) and some not
  123. so often needed, which do not increase size much.
  124.  
  125. The second main advantage is the Filename completion (short: FNC) and the
  126. review buffer. FNC is like those shells on UNICS and can therefore be
  127. controlled fully with the keyboard. No annoying filerequesters pop up,
  128. that make it neccessary to change from keyboard to mouse.
  129. Nevertheless you can use ZShell with (memory hungry and slow) console
  130. handlers like KingCON.
  131.  
  132. Third, I tried to make using ZShell as easy to use as possible. Not like
  133. UNICS shells which have thousands of options you will never keep in mind.
  134.  
  135. Fourth thing is script file execution. ZShell itself supports only the
  136. basic stuff to execute scripts, because if you need a more complex
  137. construction you can use ARexx or another programming language.
  138. ZShell was never intended to be a substitute for a programming language !
  139. You can use scripts made for AmigaDOS shell without problems, because
  140. the command EXECUTE uses AmigaDOS to execute it.
  141.  
  142. See Future for the future concepts.
  143. ============================================================================
  144. Features
  145.  
  146. Freeware, no payment required.
  147. * Usage is similar (or better) to the standard AmigaDOS shell.
  148. * About 32K small (pure assembler code, source included).
  149. * Supports the standard housekeeping commands which are builtin,
  150.   so no disk access is necessary.
  151.   eg. list, dir, cd, rename, makedir, delete, copy, path, info, type
  152. * A total of 66 builtin commands.
  153. Starting from Workbench (!) or CLI/Shell. No Installation required.
  154. * Fast Filename completion by simply pressing TAB.
  155. Anonymous pipes. You can choose between real and pseudo pipes.
  156. Review buffer to see again what scrolled out of the window.
  157. * Some commands and features for programmers.
  158. Online Help function and AmigaGuide-Documentation with examples.
  159. Command line editing better than OS2.0/3.0 Shell.
  160. * Support of OS2.0+ and OS3.0+ specific features
  161. Wild cards and recursive processing.
  162. * Real RUN and NEWCLI command that reenters ZShell quickly.
  163. DIR and LIST both sort (by default) and show filesize.
  164. * Inbuild Amigaguide-/Multi-viewer
  165. * Application-Window/-Icon
  166. * Can open window on own screen.
  167. * 100% script compatibility.
  168. * Can create and show Hard- and Softlinks.
  169. * Command and Function key aliasing.
  170. * Can iconify itself.
  171. * Most things are localized if locale.library is available.
  172. * Colorful output (or fast scrolling with OS3.0+, see CONFIG COLOUR)
  173. * Simple MORE type text viewer.
  174. * Makes itself resident for quicker starting and memory saving.
  175. ============================================================================
  176.  
  177. ############################################################################
  178.  
  179. ============================================================================
  180. Starting ZShell
  181.  
  182. There are three ways of starting ZShell:
  183.  1. The easiest way:
  184.     Start the file called "ZShell" from Workbench or CLI/Shell.
  185.  2. Put the file called "ZShell" in the C: directory and
  186.     start the file called "ZSH" from Workbench or CLI/Shell.
  187.  3. A bit complicated and only for starting from Workbench:
  188.     Make a startup script (see below) or an empty file with a PROJECT
  189.     icon. Change the default tool to "ZSH" or "ZShell" (better ZSH,
  190.     but then put ZShell in C: ) with the right path. Doubleclicking on
  191.     this project icon will start ZShell and execute this script.
  192.     You can also shift-doubleclick a startup script with ZSH/ZShell.
  193.  
  194. The first way is recommended for having a quick glance at ZShell,
  195. but if you use ZShell sometimes, the second way is better, because "ZSH"
  196. is about 800 Bytes long and starts the ZShell-resident if possible.
  197. So loading "ZShell" is only necessary the first time you use ZShell
  198. after booting up. Anyway using "ZSH" is fully optional.
  199. ============================================================================
  200. Starting from CLI
  201.  
  202. If starting from CLI/Shell you can specify the name of a script file
  203. (see EXECUTE) as an argument which will be executed after starting.
  204. Precede the name with "-s". If there is no name given, ZShell will try
  205. to execute S:ZStart . After "-w" you can specify a window-description.
  206. See NEWCLI for more details, it is exactly the same.
  207. eg.     ZSH -sram:hello     {will try to execute ram:hello}
  208.         ZShell              {will try to execute S:ZStart}
  209.         ZSH -sram:hello "-wCON:10/10/90/90/Hi there" {opens this window}
  210.  
  211. All CLI-Options:
  212.  -Sname (Script): Start script named "name" (default: S:ZStart)
  213.  -Wdesc (Window): Open window with window-description "desc"
  214.  -Ccmd (Command): Start command named "cmd"
  215.  -D     (Detach): Creates its own process (must be last option)
  216.  -N      (Noraw): Switches off the internal command-line-editing
  217.  -Edepth/diplayID/overscan/title (scrEEn): Opens Public Screen, OS2.0+
  218.  -Hfile   (Help): Determine the file (with path) of the online help (default: S:ZShell.doc)
  219.  -r (not Resident): Testing-stuff (must be first option and lowercase)
  220. ============================================================================
  221. Starting from Workbench
  222.  
  223. If starting from Workbench you can specify the window-description
  224. and the startup script (default S:ZStart , see above) with ToolTypes:
  225. eg.     WINDOW=con:20/50/400/100/Moin
  226.         SCRIPT=ram:hello
  227.         WINDOW=             {this would not open a window}
  228. Make sure that WINDOW and SCRIPT are in capital letters.
  229. (You can edit the ToolTypes by selecting an icon and then choosing
  230. "Information" from the Workbench-Menu.)
  231.  
  232. All ToolTypes:
  233.  SCRIPT=name : Start script named "name" (default S:ZStart)
  234.  WINDOW=desc : Open window with window-description "desc"
  235.  COMMAND=cmd : Start command named "cmd"
  236.  NORAW=      : Switches off the internal command-line-editing
  237.  ICONNAME=name : Specify name of the icon for iconifying (OS2.0+)
  238.  XPOS=number : Give the position of the icon (OS2.0+)
  239.  YPOS=number : Give the position of the icon (OS2.0+)
  240.  ICONIFY=    : Start in iconifyed mode (OS2.0+)
  241.  SCREEN=depth/displayID/overscan/title : Opens a Public Screen (OS2.0+)
  242.  HELPMAN=file: Determine the file (with path) of the online help (default: S:ZShell.doc)
  243.  
  244. These two are handled by Workbench 2.0+:
  245.  DONOTWAIT   : Use this if you put ZShell in the WBStartup-drawer
  246.                (preferably together with the ICONIFY ToolType)
  247.  TOOLPRI=pri : Sets the priority of the process
  248. ============================================================================
  249. Opening window on own screen
  250.  
  251. OS2.0+
  252. You can open a Public Screen using the CLI-Option "-e" or the
  253. Tooltype "SCREEN". Optionally you can pass some arguments:
  254. depth: (default 2) Number of Bitplanes being used
  255. displayID: (default $8000) DisplayID looked up in sys:WBStartup/Mode_Names
  256. overscan: (default 1) Overscan type. 1=text, 2=standard, 3=maximum
  257. title: (default ZShell) Case sensitive name of Public Screen
  258.  
  259. To get your window open there, you have to add ".../SCREEN ZShell" to your
  260. window-description.
  261.  
  262. Examples for CLI-Start:
  263. ZShell "-wCON:////Shell/CLOSE/SCREEN ZShell" -e
  264. ZShell "-wCON:1/10/640/390/Shell/CLOSE/SCREEN ZShell" -e1/$8004
  265. ZShell "-wCON:////Shell/CLOSE/SCREEN Super" -e3/$8000/2/Super
  266.  
  267. Example for Workbench-Start:
  268. SCREEN=3/$8000/1/ZShell-Screen
  269. WINDOW=CON:1/10/640/190/CLOSE/SCREEN ZShell-Screen
  270.  
  271. Example for a fullsize ZShell on its own PAL-screen:
  272. SCREEN=
  273. WINDOW=CON:1/4/640/253//NOBORDER/NOSIZE/BACKDROP/SCREEN ZShell
  274. ============================================================================
  275. Starting from Hotkey-Utilities or Directory-Utilities
  276.  
  277. In most cases you have to use a template like starting from CLI
  278. when configuring the utility.
  279.  
  280. If the utility does not open a window, you have to use the "-w" option.
  281. If the utility seems to hang up after starting ZShell, try the "-d" option.
  282. With "-d" you do not need a "-w" option.
  283. Example:  zshell -wCON:1/10/640/100/ZShell -d
  284.  
  285. Some special programs:
  286. YAK: Use "zshell -d" as argument of a hotkey-definition.
  287. MachV: EXECMD"zshell -d"
  288. MTool: Define a program with "zshell" as program and "-d" as parameters.
  289. ============================================================================
  290. Starting ZShell using KingCON
  291.  
  292. KingCON is a Console-Handler with some GUI-Features.
  293. If you do not use KingCON, you can skip this chapter.
  294.  
  295. Starting from CLI/Shell:
  296.   Use the option -n, and you can optionally use option -w.
  297.   Examples:  ZShell -n
  298.              ZShell -wKCON: -n
  299.  
  300. Starting from Workbench:
  301.   Use the ToolTypes NORAW and WINDOW=KCON:
  302.  
  303. The CLI-Option "-n" and the ToolType "NORAW" switch off the internal
  304. command-line-editor, so you could make use of the command-line-
  305. editing facilities of KingCON.
  306. ============================================================================
  307. How to use CON:
  308.  
  309. CON: stands for Console-Handler. This is a program which handles
  310. keypresses and textual outputs on its window similar to a file.
  311.  
  312. You have to pass several things when opening a CON: window:
  313. CON:leftpos/upperpos/width/height/title
  314. leftpos,upperpos are the position of the left top edge in pixels.
  315.   Both need to be 1 or more.
  316. width,height are the window's dimensions in pixels.
  317. title is a string
  318.  
  319. With OS2.0+ you can pass some more things and you can drop some things.
  320. So "CON:" alone is valid and opens with the default settings.
  321. To get a close gadget you have to append "/CLOSE", eg.
  322.     CON:1/1/600/100/Great/CLOSE
  323. "/SCREEN screenname" opens on a public screen
  324. "/WAIT" stays till you click the close gadget or press CTRL-\
  325. "/ALT" gives an alternative size with the zoom gadget
  326. ... there are some more but I do not know much of them
  327. ============================================================================
  328. Errors during starting
  329.  
  330. If there is an error during starting, a recoverable alert will appear
  331. and show a number. Here is a list what these numbers mean:
  332.  
  333. Workbench-Start:
  334. 1: No memory for CLI-Structure
  335. 2: CLI-Table 20 limit
  336. 3: No current directory
  337. 4: No icon.library
  338. 5: No icon
  339. OpenWindow:
  340. 10: Already opened
  341. 11: Cannot open output
  342. 12: Not interactive
  343. 13: Cannot open input
  344. Newcli:
  345. 15: Cannot copy CurrentDir
  346. 16: Cannot set up pipe process
  347. Input:
  348. 20: Input failed
  349. 21: Unexpected window closure (harmless)
  350. 22: Forbid or Disable state (bug in external command)
  351. ============================================================================
  352. Several notes
  353.  
  354. * You can start ZShell from within the Startup-Sequence. After ending
  355.   ZShell the Startup-Sequence will continue. If you use "ZShell -d" in
  356.   the Startup-Sequence, it will continue and a ZShell will pop up.
  357. * If you would like a scrollbar, try CB (ConBuffer) from
  358.   Aminet/util/shell/conbuffer11.lha . A bit old, but it works.
  359. * You can rename "ZSH" as what you like, but do not rename "ZShell"
  360. * If you start ZShell from the Workbench-Menu "Execute Command",
  361.   you can close the window after ending ZShell with CTRL-\  or
  362.   doubleclick the close-gadget.
  363. * ZShell and ZSH are PURE (see RESIDENT,PROTECT).
  364. ============================================================================
  365.  
  366. ############################################################################
  367.  
  368. ============================================================================
  369. History and Command Line Editing
  370.  
  371. ZShell has a 1024 byte circular history buffer. It works similar
  372. to most other shells, the NEWCON: handler in Workbench V1.3 and
  373. the standard console handler in OS2.0+.
  374.  
  375. You can change the edit keys with CONFIG CTRLKEYS.
  376. These are the default keys:
  377.  
  378.   UP ARROW        - go back one line in the history buffer
  379.   DOWN ARROW      - go forward one line in the history buffer
  380.   SHIFT UP ARROW  - go to the 1st line in the history buffer if nothing
  381.                     was typed. Otherwise the string left of the cursor
  382.                     will be searched in history buffer (like in OS2.0+)
  383.   SHIFT DOWN ARROW- go to the last line in the history buffer, which
  384.                     holds the last modified line
  385.                     This is some kind of undo.
  386.  
  387.   LEFT ARROW      - move cursor left
  388.   RIGHT ARROW     - move cursor right
  389.   SHIFT LEFT ARROW- move cursor to left end
  390.   SHIFT RIGHT ARROW move cursor to right end
  391.   CTRL R          - move cursor to start of previous word
  392.   CTRL T          - move cursor to start of next word
  393.  
  394.   CTRL S          - delete to start of line
  395.   CTRL E          - delete to end of line
  396.   CTRL W          - delete one word right of cursor
  397.   CTRL Q          - delete one word left of cursor
  398.   CTRL X          - delete whole line
  399.  
  400.   TAB             - see FILENAME COMPLETION (that is great !)
  401.   SHIFT TAB       - read review-buffer with MORE
  402.   CTRL V          - read history-buffer with MORE
  403.   CTRL F          - pop up a filerequester (needs asl.library)
  404.                     See FILENAME COMPLETION for more
  405.   CTRL L          - clear the ZShell window
  406.   CTRL P          - clear the Filename completion buffer. This is useful
  407.                     with CrossDOS, because it does not notice changes.
  408.  
  409.   RETURN          - put commandline in history-buffer and execute it
  410.   SHIFT RETURN    - put commandline in history-buffer without executing
  411.   ESC (Escape)    - quit ZShell like ENDCLI (I like this very much !)
  412.  
  413. Words are delimited by space, point, slash and colon ( ./:).
  414. Again, command line editing is similar to most shells. Backspace,
  415. delete and return do what they are supposed to do.
  416.  
  417. If you have defined (using ALIAS) some Function keys,
  418. you can use them, too.
  419.  
  420. OS2.0+:
  421. You can drop Workbench-Icons into the ZShell's window. Then the name of
  422. the icon will be inserted into the commandline.
  423. When in iconifyed mode, you can drop an icon on that
  424. Application-Icon with the same effect.
  425. ============================================================================
  426. Command Line Parser
  427.  
  428. After entering a command line and pressing RETURN, it will be analyzed.
  429.  
  430. Characters that have a special meaning:
  431.  ; separates multiple commands
  432.  | separates multiple commands with @{" piping " link pipes} output/input
  433.  > output redirection
  434.  < input redirection
  435.  " quote
  436.  
  437. If you want to use one of these characters in a normal way, like in a
  438. filename, you have to precede it by \ . If you want to have a \ before
  439. these special characters, you have to type \\ .
  440.  
  441. Example:                   a\;b\\|c\<d
  442. This will be converted to  a;b\|c<d
  443.  
  444. The ; is for multiple commands in one command line. Example:
  445.   dir ram:;info;echo Done^J
  446.  
  447. Quotes can be used to surround arguments. Inside the quotes no parsing
  448. is done. This way you can have arguments which contain spaces. Every
  449. opening quote must be followed by a closing quote. Example:
  450.   dir "ram disk:"
  451.   echo "one; two; three"
  452. ============================================================================
  453. Executing Commands
  454.  
  455. Most commands can be aborted by depressing Control-C.
  456. Nearly everything is case independent.
  457. To use a disk command simply type its name after the prompt, the
  458. same way as you would do in other shells. The first part of the input
  459. up to the first space is interpreted as commandname. It is searched
  460. for (in this order) :
  461.  1. in the alias list
  462.  2. in the internal (builtin) command list (see COMMAND OVERVIEW)
  463.  3. in the resident command list
  464.  4. in the current directory (see CD)
  465.  5. in the command search path
  466. and, if it is found, it is executed. The part after the first space
  467. is taken as arguments, also called parameters. The arguments are
  468. separated by spaces. ZShell will allow up to 25 arguments.
  469.  
  470. If the commandname was found on disk, it will be analyzed:
  471.  1. If the commandname is a directory, the current directory will be
  472.     changed (see CD) to it.
  473.  2. If the script flag is set, it will be executed eighter
  474.     as ZShell script or as ARexx script.
  475.  3. If the execute flag is set (and it is set in most cases), it will be
  476.     tried to treat it as normal executable command. 
  477.  4. If the command is not executable, it will be shown using
  478.     amigaguide.library (This is an easy way to view Guides).
  479.  
  480. eg.     addbuffers df0: 15
  481. "addbuffers" is the command, that will be found as a internal command.
  482. "df0:" is the first argument. "15" is the second argument. The third
  483. argument does not exist.
  484.  
  485. You can avoid using an alias or an internal (builtin) command or
  486. changing the current directory by typing a point before the
  487. commandname (this is called "force disk").
  488.  
  489. To abbreviate internal or resident commands put a point behind it.
  490. If you use just a point, the current directory will be set to the
  491. last current directory ("dir back").
  492. To get to the parent directory, you have to use a slash ( / ).
  493.  
  494. eg.     .addbuffers df0: 20
  495. {This uses the disk command or if available the resident addbuffers}
  496.         ad. df0: 20   {uses the internal addbuffers command}
  497.         .add. df0: 20 {if available this uses the resident addbuffers}
  498.         .             {go back to old current dir}
  499.  
  500. BEWARE of other matching commands! The first matching will be taken!
  501. "as." can mean ASK or ASSIGN, but ASK will be taken !
  502. There is no abbreviation for disk commands, use Filename  Completion
  503. ( TAB-Key ) instead.
  504.  
  505. A textual error message will be displayed if an AmigaDOS error occurs.
  506. ============================================================================
  507. amigaguide.library
  508.  
  509. For those who do not know:
  510.  amigaguide.library is Commodore's great hypertext system that can
  511.  easily be used to view documentations or to implement online-help into
  512.  own applications.
  513.  It needs Kickstart 1.3 or better.
  514.  You can get it from Fish Disk 920 or from Aminet as text/hyper/aguide34.lha
  515.  
  516. amigaguide.library V34+ can show AmigaGuide documents and ASCII documents.
  517. V39+ that comes with OS3.0+, can show all kinds of files that are supported
  518. by your datatypes including AmigaGuide and ASCII texts.
  519. So, with OS3.0+, you can enter the name of a picture in ZShell just like
  520. a command to view it.
  521. ============================================================================
  522. Using Numbers
  523.  
  524. Various internal commands need numbers as arguments. Usually you simply
  525. give a decimal number, but you also can use these prefixes:
  526.  
  527.   + Positive number
  528.   - Negative number
  529.   % Binary number
  530.   $ Hexadecimal number
  531.   & Hexadecimal APTR converted to BPTR
  532.   ! Hexadecimal BPTR converted to APTR
  533.   ^ Filename containing number
  534.  
  535. See EVAL for more.
  536. ============================================================================
  537. Wild Cards
  538.  
  539. ZShell supports wild card file descriptions on some commands
  540. (DIR,LIST,DELETE,COPY,CONFIG,JOIN,MOVE,PROTECT)
  541.  
  542. Important: If you want to use | as part of a wild card, you have to
  543.   precede it by \ or enclose the wild card by quotes. This is to avoid
  544.   to be treated as an pipe. Example:
  545.               dir ram:(*.info\|*.bak)
  546.   or          dir "ram:(*.info|*.bak)"
  547.   instead of  dir ram:(*.info|*.bak)
  548.  
  549. OS2.0+ note: The default is to use AmigaDOS wildcard patternmatching.
  550.   It is localized and has not the limitations of the internal matcher.
  551.   But you have to be careful when looking at the examples in this
  552.   documentation, because they are made for the internal matcher.
  553.   (You can even use * instead of #? with the AmigaDOS matcher, because the
  554.   wildstar flag is set by ZShell in the system for all programs. Please
  555.   tell me if this makes problems.)
  556.   To switch back to the internal matcher use: FLAGS WILD OFF
  557.  
  558.   AmigaDOS patternmatcher:
  559.  
  560.     ?       Matches a single character.
  561.     #       Matches the following expression 0 or more times.
  562.     (ab|cd) Matches any one of the items seperated by '|'.
  563.     ~       Negates the following expression.  It matches all strings
  564.             that do not match the expression (aka ~(foo) matches all
  565.             strings that are not exactly "foo").
  566.     [abc]   Character class: matches any of the characters in the class.
  567.     [~bc]   Character class: matches any of the characters not in the
  568.             class.
  569.     a-z     Character range (only within character classes). 
  570.     %       Matches 0 characters always (useful in "(foo|bar|%)").
  571.     *       Synonym for "#?", not available by default in OS2.0,
  572.             but is switched on by ZShell.
  573.  
  574.     "Expression" in the above table means either a single character
  575.     (ex: "#?"), or an alternation (ex: "#(ab|cd|ef)"), or a character
  576.     class (ex: "#[a-zA-Z]").
  577.  
  578.  
  579. The following refers to the internal patternmatcher:
  580.  
  581. Wild cards are like those supported on MessyDOS or UNICS systems, and not
  582. the same as the ones on AmigaDOS. So use * instead of #? .
  583. NOTE: You can only effectively put one * character in a wild card.
  584.  
  585. Character       Meaning
  586.   *         Match zero or more characters.
  587.   ?         Match one character.
  588.   ~         Negates the following wildcard.
  589.  [  ]       Specifies a class of characters to match.
  590.             (One of the characters in the brackets must match)
  591.   |         Separate multiple filenames (can be wildcards)
  592.             (One of the file descriptions separated by | must match)
  593.  
  594. To get that just try the examples following and try it out with DIR.
  595. eg.    list *.info      {lists all files ending in .info}
  596.        dir z*.s         {lists all files starting z, ending in .s}
  597.        delete df0:*.info   {deletes all .info files from df0:}
  598.        copy *.s ram:    {copies all .s files to ram:}
  599.        copy 1? df0:     {copies all two char files beginning with 1}
  600.        dir ~*.s         {lists all files NOT ending in .s}
  601.        list ~*.info     {lists all files except for .info files}
  602.        dir *.[co]       {lists files ending in .c or .o}
  603.        list [abcd]*     {lists files beginning with a,b,c or d}
  604.        list c:mount|version {lists the files Mount and Version}
  605.         {OS2.0+ this would be: list c:(mount|version)  }
  606.        list ram:env/a*|*b   {lists all files starting with a or
  607.                              ending with b from RAM:env (environment)}
  608.        copy ~*.info|*.bak   {copies all files NOT ending in .info
  609.                              and NOT ending in .bak}
  610. ============================================================================
  611. Options
  612.  
  613. As nearly everything, options are also case independent.
  614. The internal commands support only four options, because this is
  615. easier to remember. These options start with a dash (-) followed by
  616. one character.
  617.  
  618.   1. -C (means Clear) , used by AVAIL,ENDCLI,LOCATE,PATH,RESIDENT
  619.   2. -R (means Recursive) , used by COPY,DELETE,DIR,LIST,JOIN,
  620.               MOVE,PROTECT
  621.   3. -Q (means Quick) , used by DIR,JOIN,LIST,DELETE
  622.   4. -S (means Sort)  , used by COPY,MOVE,PROTECT
  623.  
  624. Instead of -R you could also use ALL , if FLAGS ALL ON is set.
  625.  
  626. For some special cases there are longer options used: "delete bla force"
  627. FORCE is here an option. You can abbreviate this by a point
  628. (see CONFIG DOT), so "delete bla f." is the same.
  629.  
  630. To avoid a filename, that is equal to an option, to be treated as an
  631. option you have to surround it with quotes:
  632.       copy "-r" ram:     {to copy the file -r to ram:}
  633.       delete "force"     {to delete the file named force}
  634. ============================================================================
  635. Redirecting Input/Output
  636.  
  637. The standard redirection operators are supported for all internal
  638. commands, as well as disk based and resident programs. (Redirection only
  639. affects those programs which use the dos.library's Input() and Output()
  640. functions.)
  641.  
  642.     >filename   redirect std output
  643.     <filename   redirect std input
  644.     >>filename  append redirect output (tacks output onto the end of file)
  645.     <>filename  redirect input and output, "filename" must be interactive
  646.                 like CON:, NEWCON:, NIL: and AUX:
  647.     >M          view output with MORE after the command has ended,
  648.                 you need a review-buffer for that which is big enough,
  649.                 otherwise some of the output will be swallowed.
  650.     <W >W <>W   opens a window and inputs/outputs there.
  651.     <* >* <>*   redirection to current window (rarely used)
  652.  
  653.     If you do not give a filename, input/output will be redirected to NIL:
  654.  
  655. Redirection can be placed before, between and after arguments and has
  656. the same effect for all three cases.
  657. Note that pipes are some kind of redirection.
  658.  
  659. eg.    dir >"ram disk:directory" df0:c
  660.        type zshell.doc <raw:0/0/100/100/input >raw:0/0/640/100/output
  661.        sortfile things >>df0:things.log
  662.        list >m df0:             {view output with more}
  663.        copy > df0: ram:         {redirects to NIL: , no output !}
  664.        type S:Startup-sequence >W    {outputs on own window}
  665. ============================================================================
  666. Anonymous Pipes
  667.  
  668. ZShell supports anonymous pipes with background tasks like those in UNICS
  669. and with temporary files like those in Amiga-csh.
  670.  
  671. General things about pipes   What are pipes ?
  672. Real pipes                   The real thing.
  673. Pseudo pipes                 Are better in some cases.
  674. Filters                      Something to use pipes with.
  675. Notes                        What else is interesting.
  676. ============================================================================
  677. General things about Pipes
  678.  
  679. Have you ever tried to view the output of a command with an external
  680. text viewer ? Then you probably have tried something like:
  681.  
  682.     List >T:listing -r dh0: ; MuchMore T:listing ; delete T:listing
  683.  
  684. (You do not need spaces before and after semicolons)
  685. Using anonymous pipes you simply have to type:
  686.  
  687.     List -r dh0: | MuchMore
  688.  
  689. The "|" character is the pipe symbol. This is why they are called
  690. ANONYMOUS pipes: You do not have to specify a filename.
  691. You can leave out the space before and after "|", I just included them
  692. to make it looking better.
  693. In the above example MuchMore stands RIGHT to the pipe symbol. This means
  694. that it gets its input from the output of the command LEFT to the pipe
  695. symbol. You can simulate this by "MuchMore <T:listing" instead of
  696. "MuchMore T:listing".
  697. Not every command supports reading its input from an input redirection,
  698. so not every command can stand RIGHT to | . All commands can be placed
  699. LEFT to | , but with those having no output it does not make sense.
  700.  
  701. You can use multiple | in one line like:
  702.  
  703.     List -r dh0: | UUencode | MuchMore
  704.  
  705. The List command will pass its output to UUencode, this will modify the
  706. data and outputs it to MuchMore which will display the modified output
  707. of the List command.
  708. Commands, like UUencode, which read data from input, modify it and
  709. output the modified data are called filters. They are usually used
  710. RIGHT to or BETWEEN pipe symbols.
  711. Using pipes and filters it is easy to process streams of data like:
  712.  
  713.     filter1 <infile | filter2 | filter3 | filter4 >outfile
  714.  
  715. You cannot put multiple commands between pipe symbols, like
  716.     List|UUencode;MuchMore|MuchMore
  717. This will be interpreted as "List|UUencode" and "MuchMore|MuchMore".
  718. ============================================================================
  719. Real Pipes
  720.  
  721. Real pipes are switched on by default. You can switch them on by using
  722. FLAGS PIPE ON.
  723.  
  724. All commands right to pipe symbols are launched as background tasks.
  725. This allows asynchronous data processing.
  726. Real pipes need the PIPE: device to be mounted:
  727.   Make sure you have pipe-handler (OS1.3) or queue-handler (OS2.0+) in L:,
  728.   check DEVS:Mountlist or DEVS:DOSdrivers (OS2.1+) for an entry called
  729.   PIPE: then type "mount pipe:".
  730.  
  731. If you type in:
  732.  
  733.     List | MuchMore
  734.  
  735. in the current shell the command "List >PIPE:ZShellXX" will be started
  736. (XX is a unique number) and a background shell will be launched similar
  737. to the newcli command, which will execute the command
  738. "MuchMore <PIPE:ZShellXX" (XX is the same number as above).
  739.  
  740. As long as the List command is executed, both shells will be in system
  741. and you can check this out using "show t" from a third shell.
  742. Output of the List command appears directly on the MuchMore screen, you
  743. do not have to wait till the List command finishes.
  744.  
  745. After the List command has been finished, it waits for the launched shell
  746. to end, just to not confuse you with a prompt. If you do not want to wait,
  747. you can press CTRL-E and you can go on using the first shell. Nevertheless
  748. you cannot start a new pipe until the old one ends.
  749.  
  750. A drawback however is, that not all commands are able to handle input
  751. out of the PIPE: device, in fact NONE of the internal commands can.
  752. This means that internal commands could not be on the right side of a
  753. pipe symbol if real pipes are used.
  754. You can use MuchMore (by Fridtjof Siebert & Christian Stiens), More
  755. from the Workbench Disk (make sure it is in your path, then use ".more"
  756. to access it) and some other text readers and most filters.
  757. ============================================================================
  758. Pseudo Pipes
  759.  
  760. To distinguish this from real pipes, I call them pseudo pipes.
  761. You can switch them on by using FLAGS PIPE OFF.
  762.  
  763. Pseudo pipes use temporary files in T:, so they need T: that is usually
  764. assigned in the Startup-Sequence to a directory in Ram Disk.
  765.  
  766. The commandline
  767.  
  768.      List | More
  769.  
  770. (List and More are internal commands) can be simulated with
  771.  
  772.      List >T:ZShellXXXX ; More <T:ZShellXXXX ; Delete T:ZShellXXXX
  773.  
  774. (XXXX is a unique number, being the same here). Note that the temporary
  775. file has to be deleted after use. In fact ZShell does not convert the
  776. commandline, because this would cause trouble in case of failure.
  777. First the List command will be started and its output is written to
  778. the file in T:, what means that this needs memory. After the List command
  779. has been finished, More will be started. This is synchronous processing,
  780. you have to wait for the first command to complete. The file in T: cannot
  781. be deleted before the More command ends, so data stays in memory twice.
  782.  
  783. Internal commands that can be right to the pipe symbol:
  784. MORE              EXECUTE ZSHELL
  785. TYPE              HTYPE
  786. STRINGS           SEARCH
  787.  
  788. Additional the same commands that can be used right to real pipes can
  789. also be used right to pseudo pipes.
  790.  
  791. Comparing pseudo pipes to real pipes:
  792. + Internal commands can be right to the pipe symbol
  793. + Easier to understand (and, for me, to implement :-)
  794. - Synchronous, so you have to wait
  795. - Needs much memory when handling large quantities of data
  796.   (a background shell needs only about 10KBytes)
  797.  
  798. Examples:
  799.    dir | more          {view output with MORE}
  800.    info | search dh    {shows the lines for DH0:, DH1: etc.}
  801.    resident|search -3|more   {shows all internal residents using MORE}
  802.    list df0: | htype   {maybe this looks more interesting}
  803. ============================================================================
  804. Filters
  805.  
  806. These filters are internal commands and can therefore only be used with
  807. pseudo pipes: STRINGSSEARCHHTYPETYPE
  808. (TYPE is a no effect filter, because data will not be changed.)
  809.  
  810. A fine collection of filters that support even real pipes is available
  811. on Aminet in util/cli/0filters.lha (by Bernd "0" Noll).
  812. ============================================================================
  813. Notes about pipes
  814.  
  815. * You can use aliases together with pipes; with these:
  816.     alias mm MuchMore
  817.     alias mdir %1 dir $1 \|MuchMore
  818.   (using pseudo pipes you can use More instead of MuchMore) you can use:
  819.     list|mm
  820.     mdir df0:
  821. * To see things happening, try out FLAGS DEBUG ON
  822. * To see all tasks in system, type SHOW T
  823. * To see even more things, you can use SnoopDOS (by Eddy Carroll)
  824. ============================================================================
  825. Filename Completion
  826.  
  827. Filename completion (=FNC) makes typing long filenames and directorynames
  828. easier. It does not matter if you want to type it as command or as
  829. argument. Just type some beginning characters of the desired name
  830. (it also works if you press TAB without typing anything before
  831. or if you give a path) and then press TAB . If there is more than one
  832. possibility that match, it will only be completed as far as all
  833. possibilities match and there are two ways to go further:
  834.  
  835. 1. Type in the next character(s) then again press TAB .
  836. 2. Press TAB again: The first match will show up. Press TAB again and
  837.    and again to walk through all matches (I call it cycling).
  838.    To enter a directory shown (indicated by the trailing slash) press
  839.    cursor-right. After you type any other key than TAB, it gets out of
  840.    this cycling mode (cursor-right is the only key that will be ignored).
  841.    To get back the commandline before cycling you can press
  842.    shift-cursor-down.
  843.  
  844. If a filename was fully matched, a space after it will be inserted. If
  845. a directoryname was fully matched, a slash (/) will be inserted after.
  846. If no partial match is found, the screen blinks (display beep).
  847.  
  848. You can use wildcards with FNC, too. For example you type
  849.   view env:sys/*ilbm
  850. and then press TAB. This will be expanded to
  851.   view env:sys/palette.ilbm
  852. With this you can also check out which files match to a wildcard.
  853.  
  854. Instead of TAB, you can press CTRL-F, too. This will cause a filerequester
  855. to pop up which shows all matches. Then you can choose one of these
  856. matches or something else.
  857.  
  858. Maybe you do not want *.info files to be completed. This will avoid
  859. some trouble. Use "config hide *.info" for that or see CONFIG HIDE.
  860. If you do not want to see all files that match, you can use
  861. FLAGS MATCH OFF.
  862.  
  863. To find out the advantage of FNC it is best to play around with it.
  864. It is really a very convenient and powerful thing !
  865.  
  866. The contents of the directory last used by FNC is remembered, so it can
  867. be used comfortably on slow floppy disks, too.
  868. See CONFIG FNCSIZE for more.
  869.  
  870. For example a directory contains:
  871.   MegaEditExample
  872.   MegaEditExample.info
  873.   MegaViewer
  874.   MoreMegaFiles               {directory}
  875.  
  876. If you want to change the current directory to MoreMegaFiles you type:
  877.     mo
  878. then press the TAB key. You will see the full name with a slash at the
  879. end. Just press RETURN and you changed it.
  880. To delete MegaViewer you type:
  881.     delete me
  882. and press TAB . You will see "Mega". Now type the V key and
  883. press TAB again. You see "delete MegaViewer ". Press RETURN and
  884. it will be gone.
  885. You want to start MegaEditExample. Type:
  886.     me
  887. and press TAB. Then type E and press TAB. There is no space after the
  888. name. This is because MegaEditExample.info also matches.
  889. Start it by pressing RETURN.
  890. ============================================================================
  891. Tips and Hints
  892.  
  893. * Use MORE instead of TYPE.
  894.  
  895. * Useful aliases:
  896.         alias arexx %1 %2 putmsg $1 0 0 0 0 0 "$2"
  897.   So 'arexx showdvi "tofront"' is the same as the example in PUTMSG.
  898.   If you want some shortcuts like MessyDOS:
  899.         alias md makedir
  900.         alias ren rename
  901.         alias del delete
  902.         alias dc diskchange
  903.   These are only needed for OS1.3-:
  904.         alias setenv %1 %2 echo >ENV:$1 $2
  905.         alias getenv %1 type ENV:$1
  906.         alias unsetenv %1 delete ENV:$1
  907.  
  908. * From Workbench assigns are most likely done by clicking an icon:
  909.   For example if you have the assigns below in the script
  910.         failat 10
  911.         assign TEX: dh0:text/pastex
  912.         assign MF: dh0:text/pastex/metafont
  913.         putmsg
  914.   you need to get a PROJECT ICON for that. Now define the default
  915.   tool as ZSH (or ZShell) and a tooltype containing
  916.         WINDOW=
  917.   (case sensitive). That's all. Failat 10 breaks the script if
  918.   an error occurs. Putmsg flashes the screen to indicate that
  919.   everything was successful. No window will be opened.
  920.  
  921. * CTRL-R and CTRL-T are for moving the cursor one word backwards/forward.
  922.   Probably you would rather like to use Alt-Cursor-Left and
  923.   Alt-Cursor-Right instead. This is not possible to do in ZShell, but
  924.   you can modify your Keymap according to it, because usually Alt-Cursor
  925.   is unused. Get yourself a keymap editor and set it to CTRL-R and to
  926.   CTRL-T (same as hexadecimal 12 and 14).
  927.  
  928. * A script counting down from 10 to 0 (a bit complicated and slow) :
  929.     failat 11 ; setenv helpenv 11
  930.     lab backtohere
  931.     copy > ENV:helpenv ENV:counter
  932.     eval >ENV:helpenv ^ENV:counter 1 -
  933.     echo "Current number: " ; eval ^ENV:helpenv
  934.     if not error
  935.        skip backtohere
  936.     endif
  937. ============================================================================
  938.  
  939. ############################################################################
  940.  
  941. ============================================================================
  942.  
  943. ############################################################################
  944.  
  945. ============================================================================
  946. Builtin Commands for Disk Management
  947.  
  948. Following there are descriptions of the standard DOS commands which are
  949. builtin in ZShell (and therefore need not be loaded from disk).
  950. Square brackets [] mean that the argument enclosed in is optional.
  951. A vertical bar | separates multiple possibilities, choose only one.
  952.  
  953. AddBuffers drive [number_of_buffers]
  954. Assign [logical name:] [directory] [ADD|DEFER|PATH|REMOVE]
  955. Cd [destination]
  956. Copy [-R] [-S] source1 [source2] ... [destination]
  957. Delete [-R] [-Q] source1 [source2] [source3] ... [FORCE]
  958. Delete Device devicename [name [filesystem]]
  959. Dir [-R] [-Q] [source1] [source2] ...
  960. FileNote file|directory comment
  961. HType source [offset]
  962. Info
  963. Join [-R] [-S] source1 [source2] ... destination
  964. List [-R] [-Q] [source1] [source2] ...
  965. Lock device ON|OFF
  966. MakeDir directory1 [directory2] ...
  967. MakeIcon filename [icontype]
  968. MakeLink linkname filename [SOFT]
  969. More source [line_count]
  970. Move [-R] [-S] source1 [source2] ... [destination]
  971. Protect [-R] [-S] [file/dir1] [file/dir2] ... [+|-|=|h|s|p|a|r|w|e|d]
  972. Relabel drive newname
  973. Rename source destination
  974. Resident [command1] [command2] ...
  975. Search file search_string
  976. SetDate file|directory [date/time]
  977. Split [-Q] source dest length [offset]
  978. Type source
  979. ============================================================================
  980. ADDBUFFERS drive number_of_buffers
  981.  
  982. * ADDBUFFERS increases disk access speed on the specified drive by
  983.   adding a number of sector cache buffers. Each additional buffer
  984.   reduces memory by about 560 bytes. Generally, 25-30 buffers per
  985.   floppy drive is optimal.
  986.  
  987. eg.     addbuffers df0: 25
  988.         addbuffers df1: 30
  989. ============================================================================
  990. ASSIGN [logical name:] [directory] [ADD|REMOVE|DEFER|PATH]
  991.  
  992. * ASSIGN will assign a logical device name to a disk directory.
  993.  
  994. eg.     assign z: df1:zshell_source
  995.   Now if you do a DIR Z: you will get a directory of df1:zshell_source.
  996.   Similarly, the default device names can be reassigned.
  997. eg.     assign libs: df1:libs
  998.  
  999. * Typing ASSIGN with no parameters, will list the current device
  1000.   assignments.
  1001. eg.     assign
  1002.  
  1003. * Only for OS2.0+:
  1004.  "ASSIGN name: REMOVE" or "ASSIGN name: dir REMOVE" removes that assign
  1005.  "ASSIGN name: dir ADD" assigns multiple dirs to name:
  1006.  "ASSIGN name: pathname DEFER" will become a normal assign when accessed
  1007.   the first time. So you can assign to a path that does not exist yet.
  1008.  "ASSIGN name: pathname PATH" assigns to a path. Similar to DEFER, but
  1009.   will not converted into a normal assign. If you have "assign bla: df0:
  1010.   path" and do "list bla:", you will get the directory of the disk
  1011.   inserted NOW (!) in df0:.
  1012. ============================================================================
  1013. CD [destination]
  1014. * Changes the current directory to "destination". If no parameter
  1015.   is given, the current directory's name is shown. It is easier to
  1016.   change the directory by simply typing its name (without CD).
  1017.  
  1018. eg.     cd ram:
  1019.         ram:t               {same as "cd ram:t"}
  1020. ============================================================================
  1021. COPY [-R] [-S] source1 [source2] ... [destination]
  1022.  
  1023. * COPY copies all source files or files in the source directories to the
  1024.   destination directory. If the destination directory does not exist, it
  1025.   will be created. If no destination is given (in this case you can specify
  1026.   only one source file/dir ofcourse), the current directory will be taken.
  1027. * You can use wild cards to specify files.
  1028. * The filedate, filecomment and protection-bits are copied with it.
  1029. * With Option -R given, subdirectories and the files and
  1030.   directories in there are also copied (recursive copying).
  1031.   If you have the ALL FLAG set, you can use ALL as last
  1032.   argument instead of -R.
  1033. * With Option -S given, it sorts. But who needs that ?
  1034.  
  1035. Note 1: Copying will be done in 50KBytes blocks. This should be a good
  1036.   value. You can change it with CONFIG COPYSIZE.
  1037. Note 2: You can use option ALL instead of -R .
  1038.  
  1039. eg.     copy c:dir df1:c
  1040.         copy dir list type cd df1:c
  1041.         copy -r df0:devs df1:devs
  1042.         copy -r source:*.s ram:
  1043.         copy df0: df1:          {only copy the files in df0: to df1:}
  1044.  
  1045. * You can also copy a file to a file. This is like copying to a dir and
  1046.   then renaming. Date, comment and bits are not copyied with it.
  1047. eg      copy df0:fred ram:wilma
  1048.   With that you can print a file etc.
  1049. eg.     copy file PRT:
  1050.         copy CON: barney
  1051. ============================================================================
  1052. DELETE [-R] [-Q] source1 [source2] [source3] ... [FORCE]
  1053.  
  1054. * Deletes one or more files or directories ("source1","source2",...).
  1055. * "source" can be a wild card file description.
  1056. * If you specify the -r option when deleting a directory,
  1057.   then all subdirectories are recursively deleted also. Otherwise (if the -r
  1058.   option is not given) only the files in the specified directory are deleted.
  1059. * To be safe, delete requests you to really delete a file. You can answer
  1060.   with "Y" (yes) or RETURN if you want this file to be deleted
  1061.        "N" (no) if you do not want this file to be deleted
  1062.        "A" (all) if you do not want to be asked anymore
  1063.        "Q" (quit) if you want to abort deleting.
  1064.   To avoid asking, use option -q , but be careful !
  1065. * Ever got the problem with thousands of delete-protected files ?
  1066.   Solution is simple: Use FORCE as last option.
  1067.  
  1068. NOTE 1: "delete RAM:BLA" (BLA is a directory) tries
  1069.   to delete the directory "BLA", not the files in there !
  1070.   Use "delete RAM:BLA/*" (deletes only the files in there)
  1071.   or "delete -r RAM:BLA" (deletes all files and directories inside,
  1072.   then tries to delete BLA itself) for that !
  1073. NOTE 2: You can use option ALL instead of -R .
  1074.  
  1075. WARNING 1: You can hardly get back what you have deleted !
  1076.   So be careful, especially when using the -r option !
  1077.   (Try DISKSALV for getting lost files back, DO NOT USE DISCDOCTOR!)
  1078.  
  1079. WARNING 2: To delete (hard- or soft-)links you have to use wild cards !
  1080.   So instead of "delete c:linkname" use with OS1.3- "delete c:linkname|"
  1081.   and with OS2.0+ "delete c:(linkname)".
  1082.  
  1083. eg.     delete fred wilma barney betty dino
  1084.         delete df0:devs df1:c df1:data ram:
  1085.         delete menu/* force
  1086.         delete -r devs:
  1087.         delete -r df1:  {better use "delete device df1:"}
  1088. ============================================================================
  1089. DELETE DEVICE devicename [name [filesystem]]
  1090.  
  1091. OS2.0+ only !
  1092. * Has the same effect as "FORMAT DRIVE device NAME name QUICK NOICONS".
  1093.   devicename is something like DF0: etc., but better not DH0: !
  1094.   The name and the filesystem of the disk will be kept the same, except
  1095.   you specify new ones. See INFO on how filesystems look like.
  1096. eg.: You have an Oldfilesystem- (OFS) disk and want to get a Fastfilesystem-
  1097.     (FFS) disk out of it. No need to format the whole disk ! Use
  1098.         delete device df0: empty ffs
  1099. ============================================================================
  1100. DIR [-Q] [-R] [source1] [source2] ...
  1101.  
  1102. * Lists the directory of the "source" to the screen. Hitting space
  1103.   will pause the listing and backspace will continue it. Files are
  1104.   shown with their size in bytes. DIR lists the current directory
  1105.   if no parameter is given. If "source" is a filename, then only
  1106.   that file is listed. If the option "-q" is not given, the filenames
  1107.   will be sorted alphabetically. With the option "-R" given
  1108.   it will list recursive.
  1109. * All files/dirs with the H-bit (see PROTECT) set, will not be shown.
  1110.   All files that are ignored by FILENAMECOMPLETION are also hidden.
  1111. * If it is a link, it shows H (for hardlinks) or S (for softlinks) after
  1112.   the filesize. See MAKELINK.
  1113.  
  1114. eg.     dir df0:
  1115.         dir -q devs:printers/hp*
  1116. ============================================================================
  1117. FILENOTE file|directory comment
  1118.  
  1119. * FILENOTE creates or changes a comment of the file or directory.
  1120.   This comment can be up to 116 characters long and can be displayed
  1121.   using the LIST command. It is useful if the filename does not say
  1122.   what for this file is. Add a comment to this file and you will
  1123.   forever know what this file does.
  1124.  
  1125. eg.     filenote devs:mountlist "This is used by the mount command"
  1126. ============================================================================
  1127. HTYPE source [offset]
  1128.  
  1129. * HTYPE outputs a hex listing of the file specified. Output is the
  1130.   same as the M command. SPACE pauses the listing, BACKSPACE
  1131.   gets it going again, and CTRL-C will abort the listing.
  1132.  
  1133. * "HTYPE source offset" starts to display the file after "offset" bytes.
  1134.  
  1135. eg.     htype c:list
  1136. ============================================================================
  1137. INFO
  1138.  
  1139. * Lists lots of information about all available volumes (like disks).
  1140.   These columns mean:
  1141.   NAME: Name of the device containing the volume
  1142.   UNIT: Unitnumber, not very interesting
  1143.   SYS:  Filesystem, can be one of:
  1144.         OFS : Oldfilesystem (old fashioned and slow)
  1145.         FFS : Fastfilesystem (needs OS2.0+)
  1146.         INO/INF : International OFS/FFS
  1147.         DCO/DCF : Directory Cache OFS/FFS (needs OS3.0+)
  1148.         MSD : CrossDOS Filesystem (MessyDOS)
  1149.         ??? : Unknown
  1150.   SIZE: Maximum useable size of the Volume in KBytes (1024 Bytes)
  1151.   FREE: Free/useable size in KBytes
  1152.   FULL: Ratio between used size and maximum size
  1153.   BLOCK: Size of a single block in Bytes
  1154.   STATUS: Says if it is possible to write to that volume
  1155.   ERR:  Number of soft errors, I only saw 0 yet
  1156.   VOLUME: Name of the volume (name of the disk).
  1157. * Note: It would not make sense to show the free size in Bytes,
  1158.   because space can only be allocated in whole blocks and one
  1159.   block is at least 488 Bytes large.
  1160.  
  1161. eg.     info
  1162. ============================================================================
  1163. JOIN [-R] [-S] [sourcefile1] [sourcefile2] ... destfile
  1164.  
  1165. * JOIN concatenates one or more files to form a new file (destfile).
  1166. wild cards are supported.
  1167. * See  COPY for more.
  1168.  
  1169. eg.     join fred.doc roy.doc dog.doc mydocs.doc
  1170. ============================================================================
  1171. LIST [-R] [-Q] [source1] [source2] ...
  1172.  
  1173. * Lists the directory of the "source" to the screen. Hitting space
  1174.   will pause the listing and backspace will continue it.
  1175. * LIST acts similar to DIR, but outputs more information:
  1176.   - Hidden files will be shown
  1177.   - Shows the date and time of the last change. See DATE.
  1178.   - Shows the protection-bits. See PROTECT.
  1179.   - If available, the comment will be shown. See FILENOTE.
  1180.   - If it is a link, it shows where it is linked to. See MAKELINK.
  1181.     (Note:softlinks are resolved by ReadLink(), hardlinks by simply Lock())
  1182. * LIST supports recursive listing. That means the contents of all
  1183.   subdirectories are shown. To use it, specify the -r option.
  1184. * With the -q option given, it does not sort nor print
  1185.   comments and links.
  1186.  
  1187. eg.     list
  1188.         list sys:system
  1189.         list -q df0:
  1190.         list -r -q *.info    {show all INFO-files in the current and
  1191.                               in the sub-directories}
  1192.         list -r ram:~*.info  {show all except *.info files in RAM:}
  1193. ============================================================================
  1194. LOCK device ON|OFF
  1195.  
  1196. * "LOCK device ON" locks the write-access to a device
  1197. eg.     lock df0: on
  1198.   will make it impossible to write to or change something on the
  1199.   disk inserted in DF0:
  1200. * "LOCK device OFF" makes write-access to a device possible again.
  1201.  
  1202. eg.     lock dh0: on
  1203.         lock dh0: off
  1204. ============================================================================
  1205. MAKEDIR [directory1] [directory2] ...
  1206.  
  1207. * Creates one or more directories of the names specified.
  1208.  
  1209. eg.     makedir temp
  1210.         makedir c l s libs devs fonts
  1211.         makedir devs/printers ram:c
  1212. ============================================================================
  1213. MAKEICON filename [icontype]
  1214.  
  1215. OS2.0+ only !
  1216. * Makeicon creates a default icon for the file "filename". "icontype" can
  1217.   be one of: DISK, DRAWER, TOOL, PROJECT, GARBAGE, DEVICE, KICK or APPICON
  1218.   "filename" is without appending .info.
  1219.   Note that DEVICE and APPICON will not be available on most systems.
  1220. * OS3.0+ only: Makeicon without icontype pops up the information-window
  1221.   of Workbench.
  1222.  
  1223. eg.     makeicon barney tool
  1224.         makeicon sys:libs drawer  {"makeicon libs: drawer" will not work}
  1225.         makeicon sys:system/format
  1226. ============================================================================
  1227. MAKELINK linkname filename [SOFT]
  1228.  
  1229. OS2.0+ only !
  1230. * Makelink creates a Hardlink or Softlink to the file or directory
  1231.   "filename". "linkname" must be a filename, that does not exist yet.
  1232.   You can use links like the file/directory itself, but they need nearly
  1233.   no additional diskspace. In most cases you would use Hardlinks.
  1234. * If you delete a file a Hardlink is linked to, the Hardlink will become
  1235.   the file itself. Hardlinks cannnot work accross devices, use Softlinks
  1236.   for that. (Hardlinks are resolved by the filesystem.)
  1237. * Softlinks are links to a path, that is checked every time when accessed,
  1238.   so a link to DF0: depends on the disk inserted in DF0: .
  1239.   (Softlinks are resolved by AmigaDOS)
  1240.   I wonder why Softlinks are not supported by the commands in the C:
  1241.   directory even of Workbench 3.0 ? A bit old fashioned !
  1242.  
  1243. !WARNING: To delete (hard- or soft-)links you have to use wild cards !
  1244. !  So instead of "delete c:linkname" use with OS1.3- "delete c:linkname|"
  1245. !  and with OS2.0+ "delete c:(linkname)".
  1246.  
  1247. eg.     makelink muchmore ppmore
  1248.         makelink sys:commands c:
  1249.         makelink readme df0:readme soft  {so with "more readme" you will
  1250.     see the readme-file on the disk currently inserted into DF0: }
  1251. ============================================================================
  1252. MORE source [line_count]
  1253.  
  1254. * MORE acts as a simple (ANSI) text file viewer. By default, it will
  1255.   show some lines of a text file, then wait for some user input.
  1256.  
  1257. eg.     more readme
  1258.  
  1259.  *After pressing "H" you get some Help information.
  1260.  *To move around in the text, you can use the CURSOR-KEYS:
  1261.     UP        : Go one line up
  1262.     DOWN      : Go one line down
  1263.     LEFT      : Go one page up
  1264.     RIGHT     : Go one page down
  1265.     SHIFT-UP  : Go to the top of the text
  1266.     SHIFT-DOWN: Go to the bottom of the text
  1267.   You can also use the keys 1,2,3,7,8 and 9 of your numeric keypad.
  1268.   SPACE does the same as SHIFT-DOWN, BACKSPACE the same as SHIFT-UP.
  1269.  *The key "S" will prompt you what to Search for. If you just press
  1270.   RETURN, then the last item will be searched for. Searching begins
  1271.   at the second top line shown. If the item is found, the line, it
  1272.   is in, is displayed as the first line.
  1273.  *The key "N" searches for Next occurence of the search string
  1274.  *The key "W" Writes the text to a file. If you enter PRT: as filename,
  1275.   the text is send to the printer. Press just RETURN to cancel.
  1276.  *Press "J" to Jump to a position you can give in %.
  1277.  *Press "R" after you have Resized the window (or to Redraw the window
  1278.   for another reason).
  1279.  *Press "Q" or "ESC" to quit MORE.
  1280.  *Typing any other key will be ignored.
  1281.  
  1282. All keys except the numeric keypad, SPACE, BACKSPACE and ESC can be
  1283. redefined using CONFIG MOREKEYS.
  1284.  
  1285. * Specifying the optional line count will allow you to show more or
  1286.   less than the default number of lines, that will fit exactly on the
  1287.   window. Useful when using FLAGS CUT OFF.
  1288.  
  1289. eg.     more contents 12
  1290.         more super.doc 25
  1291. ============================================================================
  1292. MOVE [-R] [-S] source1 [source2] ... [destination]
  1293.  
  1294. * This is very similar to the copy-command, but all files/directories
  1295.   copyied will be deleted afterwards. If an error happens, the source will
  1296.   not be deleted. If it was OK, you will see "... copyied"
  1297. * If source and destination are on the same device it uses rename
  1298.   instead. This is quicker and needs less disk accesses. Then you will
  1299.   see "...moved".
  1300. * Note the difference between "move dir" and "move dir/*".
  1301.  
  1302. eg.     move ram:a ram:b
  1303.         move -r df0:* df1:
  1304.         move c:mount devs:
  1305. ============================================================================
  1306. PROTECT [-R] [-S] filename1 [filename2] ... [+|-|=|h|s|p|a|r|w|e|d] [+|...
  1307.  
  1308. * Allows you to alter/see the protection bits associated with a file
  1309.   or a directory. To see it, you can also use LIST.
  1310.   You can use wild cards to process multiple files.
  1311. * See COPY  how to use -r and -s.
  1312. * PROTECT filename +bits_to_set -bits_to_clear
  1313.   Sets all bits_to_set and resets all bits_to_clear.
  1314.   You can give one + or one - or both or both not.
  1315. * PROTECT filename =bits_to_be
  1316.   Sets all bits_to_be and resets all other bits
  1317.  
  1318. eg.     protect game +hp -rwd
  1319.         protect monitor =srwe
  1320.         protect -r df0:* -d
  1321.  
  1322. Bits:   "h"     hidden  V1.3
  1323.         "s"     script  V1.3
  1324.         "p"     pure    V1.3
  1325.         "a"     archive V1.3 -> is reset when file is changed
  1326.         "r"     readable
  1327.         "w"     writable
  1328.         "e"     executable   -> will be checked before executing
  1329.         "d"     deletable
  1330. ============================================================================
  1331. RELABEL drive newname
  1332.  
  1333. * RELABEL renames the disk specified with the newname given.
  1334.  
  1335. eg.     relabel Empty: MY_DISK
  1336.         relabel df0: FISHMONGER
  1337. ============================================================================
  1338. RENAME source destination
  1339.  
  1340. * Renames the file or directory of name "source" to that of
  1341.   "destination". You can use this to move files on a disk.
  1342.  
  1343. eg.     rename df0:c/list df0:ls        {moves and renames}
  1344.         rename ed Editor                {just renames}
  1345. ============================================================================
  1346. RESIDENT [command1] [command2] ...
  1347.  
  1348. * RESIDENT allows you load commands into memory, such that they
  1349.   will execute immediately, rather than be loaded from disk all the
  1350.   time. The benefit of RESIDENT over saving commands on the RAM:
  1351.   disk is that only one copy of the command is in memory all the
  1352.   time. RAM: based commands will use up twice as much memory when
  1353.   the command is being executed.
  1354.  
  1355. * The limitation of RESIDENT is that only certain commands will
  1356.   work. Generally, all commands which have their PURE bit (see
  1357.   PROTECT) set can be made RESIDENTABLE. However, RESIDENT
  1358.   does not check whether the PURE bit is set before loading, and
  1359.   hence you can try out commands to see if they work. They'll
  1360.   always work the first time. Its only when executing the 2nd
  1361.   time that the Amiga will likely crash.
  1362.   Note: Crunched programs will most likely not work.
  1363.  
  1364. * Typing RESIDENT with no parameters will show the current list
  1365.   of resident commands:
  1366.     ADRESS is useful for programmers
  1367.     USECOUNT says how many times it is used right now
  1368.              ROM internal residents have negative values
  1369.     NAME means the name  (hard to guess :)
  1370.  
  1371. * Typing one or more command names after RESIDENT will make those
  1372.   commands resident. ZShell will search the command search path
  1373.   to try and find them.
  1374.  
  1375. eg.     resident c/list c/cd c/date c/avail
  1376.         resident ed
  1377. ============================================================================
  1378. SEARCH file search_string
  1379.  
  1380. * SEARCH searches for the search_string in the file. The file can
  1381.   be a binary (eg. executable) or a text. Each occurance
  1382.   will be printed on the window with highlighted search_string.
  1383.   If the file is a text, the whole line will be printed.
  1384.   If it is a binary file, it will be printed from the occurance
  1385.   to the next NULL or LF.
  1386. * Searching is case independent (of course!).
  1387. * To search for a string at the beginning of a line (textfile only)
  1388.   put a point (.) before the search_string.
  1389.  
  1390. eg.     search zshell.doc "binary (eg."
  1391.         search s:startup-sequence .assign
  1392.           {show all assigns, but not "resident assign"}
  1393.         search c:mount $ver:    {show version number and date,
  1394.                             should work with all newer executables}
  1395. ============================================================================
  1396. SETDATE file|directory [date/time]
  1397.  
  1398. * SETDATE changes the date-of-last-change (DOLC) of a file or directory.
  1399.   The DOLC can be shown by simply listing this file with LIST.
  1400. * SETDATE with no date/time given sets the DOLC to the systemtime
  1401.   (see DATE,SETCLOCK).
  1402. * If you want to set the DOLC to a special date you have to specify
  1403.   the date or time or both in a format described at DATE.
  1404.  
  1405. eg.     setdate ram:newthings
  1406.         setdate devs:mountlist 21.8.71      {very old}
  1407.         setdate murks 18:24:12 12-24-96     {future}
  1408. ============================================================================
  1409. SPLIT [-Q] source dest length [offset]
  1410.  
  1411. * SPLIT is the opposite of JOIN.
  1412.   It splits up a (large) source file into several smaller pieces which
  1413.   get their name from "dest" and an automatically appended two digit
  1414.   number. The asking between the single files allow to change floppy
  1415.   disks and makes it possible to split a large file directly on multiple
  1416.   floppy disks. See delete for more about that.
  1417.   (The source file does not need to fit into memory.)
  1418.  
  1419. eg.     split aminet.index df0:index 750000
  1420.   {assuming that aminet.index is 2MB big, this creates df0:index01
  1421.   df0:index02 and df0:index03 }
  1422. other egs.  split -q bigfile small 10000    {does not ask}
  1423.             split bigfile small 10000 5000  {skip the first 5000 bytes}
  1424. ============================================================================
  1425. TYPE source
  1426.  
  1427. * Prints to the screen the ASCII/ANSI text file specified as "source".
  1428.   Hitting any key will pause the listing. Backspace will restart it.
  1429.   CTRL-C will abort the listing.
  1430. * Use MORE instead of TYPE, if possible.
  1431.  
  1432. eg.     type readme
  1433. ============================================================================
  1434.  
  1435. ############################################################################
  1436.  
  1437. ============================================================================
  1438. Builtin Commands for Scripts and Controlling
  1439.  
  1440. Following there are descriptions of the other commands which are
  1441. builtin in ZShell (and therefore need not be loaded from disk).
  1442. Square brackets [] mean that the argument enclosed in is optional.
  1443. A vertical bar | separates multiple possibilities, choose only one.
  1444.  
  1445. Alias [variable] [definition]
  1446. Ask [question]
  1447. Avail [-C]
  1448. Border ON|OFF [number]
  1449. Cls
  1450. Date [hh:mm:ss|dd.mm.yy|mm-dd-yy]
  1451. Echo [string]
  1452. Else
  1453. EndCLI [-C]
  1454. EndIf
  1455. Eval expression
  1456. Execute [ZSHELL] source
  1457. FailAt [failat_level]
  1458. Fault [error_number]
  1459. Help [topic]
  1460. If [NOT][WARN][ERROR][FAIL][EXISTS file]
  1461. Lab label
  1462. MemClk ON|OFF|ALARM
  1463. NewCLI [-Wnew_window] [-Sstart_script] [-Ccommand] [-N] [-Hhelpfile] [-E]
  1464. Path [-C] [path1] [path2] [path3] ...
  1465. Prompt [string]
  1466. Quit [error_code]
  1467. Review [bytesize|-C|-Sfilename]
  1468. Run commandline
  1469. SetClock LOAD|SAVE
  1470. Skip label
  1471. Stack [size]
  1472. UnAlias [alias1] [alias2] [alias3] ...
  1473. Wait timeout
  1474. Comments
  1475. ============================================================================
  1476. ALIAS [variable] [definition]
  1477.  
  1478. * ALIAS assigns a variable name to a definition. The variable name
  1479.   can be up to 15 characters long, and the definition can be up to
  1480.   about 360 characters long.
  1481.  
  1482. * Typing ALIAS with no parameters at all, will generate a list of all
  1483.   current alias definitions.
  1484.   eg.   alias
  1485.  
  1486. * Aliasing of Function Keys
  1487.   eg.   alias f1 ed df0:s/startup-sequence^M
  1488.   This example assigns the unshifted F1 key to "ed df0:s/startup-sequence"
  1489.   with following return. Note that the ^M characters puts an auto
  1490.   carriage return in the definition.
  1491.   eg.   alias F10 cd df0:^M
  1492.   This sets shifted F10 to "cd df0:<CR>".
  1493.   You can use quotes to make it look better:
  1494.         alias f2 "cd df1:^M"
  1495.         alias f4 "genim2 "
  1496.         alias F9 "scribble df0:text/"
  1497.   If you want to use a semicolon in the alias, you need to use quotes:
  1498.         alias f1 "a68k z.a;blink z.o to z^M"
  1499.   or leave away the quotes and use a backslash before the semicolon:
  1500.         alias f1 a68k z.a\;blink z.o to z^M
  1501.  
  1502. * Aliasing of commands
  1503.   eg.   alias mv rename
  1504.   This allows an alternate name for rename. i.e. mv.
  1505.   So you could type
  1506.         mv oldname newname      {to rename oldname to newname}
  1507.  
  1508.   eg.   alias as a68k
  1509.         alias pp powerpacker
  1510.         alias go "a68k zsh.s;blink zsh.o to zsh"
  1511.         alias cped copy df0:c/ed
  1512.   You would use this last alias, if you need to copy a particular
  1513.   file a lot. So, to copy c/ed to ram: use:
  1514.         cped ram:
  1515.  
  1516. * You can also pass external parameters to an alias.
  1517.   eg.   alias al "%1 a68k $1.s;blink $1.o to $1"
  1518.   Typing
  1519.         al test
  1520.   will assemble test.s using a68k, then blink test.o to become test.
  1521.  
  1522. You can specify upto eight parameters to pass to a command alias.
  1523. At the start of the alias definition, specify the parameters to pass
  1524. with the variables %0 thru %7. These need not be in sequence. The
  1525. first %n will be assigned to the first parameter, the 2nd %n to
  1526. the 2nd parameter etc.
  1527. Insert the corresponding variables $0 thru $7 at the points in the
  1528. alias definition where that parameter is to appear.
  1529. eg.     alias disp %1 %2 %3 echo "$3 $2 $1"      {is the same as: }
  1530.         alias disp "%1 %2 %3 echo "$3 $2 $1""    {note the quotes}
  1531.         alias cram %0 %1 %2 %3 copy $0 $1 $2 $3 ram:
  1532.         alias go %5 %1 %6 %2 echo "1st-$5 2nd-$1 3rd-$6 4th-$2"
  1533.  
  1534. * Command aliases can be nested to nearly unlimited levels.
  1535.   eg.   alias clear echo ^L\;alias cdir "%1 clear;cd $1;dir"
  1536.  
  1537. * An important point about aliases, is that you can redefine the
  1538.   existing internal command names.
  1539.   eg.   alias help "type help_screen"
  1540.   This would make it so that pressing HELP or typing H E L P would
  1541.   not generate the standard help command list, but would type the
  1542.   file called  help_screen to the screen. Similarly
  1543.   eg.   alias copy c:copy       {replace copy by disk-based copy}
  1544.         alias info c:dfree
  1545.         alias list .list        {replace list by disk-based list}
  1546.  
  1547. * See UNALIAS for how to remove alias definitions.
  1548. ============================================================================
  1549. ASK [question]
  1550.  
  1551. * ASK prompts the user with a question requiring a Yes or No
  1552.   answer. If the first letter of the users response is "Y", ASK
  1553.   returns code WARN. Responding "E" returns ERROR, "F" returns
  1554.   FAIL. Any other letter will result in return code OK.
  1555.   The question can include ASCII characters as well as control
  1556.   codes as per the ECHO command.
  1557.  
  1558. eg.     ask "Do you want commands copied to ram? "
  1559.         if warn
  1560.                copy c: ram:
  1561.         endif
  1562.  
  1563. Note: You can redirect the ANSWER to a file by redirecting the OUTPUT.
  1564. eg.     ask >ENV:CallIt        {The answer is written to CallIt}
  1565. ============================================================================
  1566. AVAIL [-C]
  1567.  
  1568. * AVAIL shows the available memory as:
  1569.   1.Total chip memory free,
  1570.   2.Total fast memory free,
  1571.   3.Total memory free.
  1572.  
  1573. * With option "-c" given, it tries to free unused memory
  1574.   (remove unused libraries, devices and the help manual)
  1575.  
  1576. eg.     avail
  1577.         avail -c
  1578. ============================================================================
  1579. BORDER ON|OFF [number]
  1580.  
  1581. * Switches the border of the window on or off. If the border is off
  1582.   there will fit some more characters in a line; this can be useful
  1583.   when viewing texts with MORE.
  1584. * If you run OS1.3-, you should do a CLS or "echo ^L" after
  1585.   using BORDER OFF.
  1586. * If you specify a number after ON or OFF, the window is resized as
  1587.   large as possible. The number means the wanted distance of the
  1588.   window top to the screen top in pixels. By specifying a negative
  1589.   value the window will just not hide the screens menu bar.
  1590.  
  1591. eg.     border off
  1592.         border on 0         {fills full screen}
  1593.         border off -1       {does not hide the menu bar}
  1594.         border on 10;cls    {with OS1.3-}
  1595. ============================================================================
  1596. CLS
  1597.  
  1598. * CLS clears the window.
  1599.   It also resets the consolehandler, so if you see lots of funny
  1600.   characters on the window, try CLS.
  1601. * You can do the same by using "echo ^[c".
  1602. * CTRL L only clears the window (same as "echo ^L").
  1603.  
  1604. eg.     cls
  1605. ============================================================================
  1606. DATE [hh:mm:ss|dd.mm.yy|mm-dd-yy]
  1607.  
  1608. * DATE without arguments shows the actual date and time (systemtime).
  1609. * You can specify one or two arguments to set date or time or both.
  1610.   The time format must be in HOUR:MINUTE:SECOND . Do not forget the
  1611.   colon (:) between. Give only one or two digit numbers.
  1612.   There exists two formats for setting the date. First is
  1613.   DAY.MONTH.YEAR . Second is MONTH-DAY-YEAR . Use only one or two
  1614.   digit numbers.
  1615.  
  1616. eg.     date
  1617.         date 14:15:00         {quarter past two PM}
  1618.         date 12.5.94          {12th of May in 1994}
  1619.         date 3-30-88 8:12:45  {30th of March in 1988 in the morning}
  1620. ============================================================================
  1621. ECHO [string]
  1622.  
  1623. * Prints the "string" to the screen. If you want spaces in the
  1624.   string, make sure the whole string is enclosed in quotes. If you
  1625.   want to print special control characters (eg. ctrl-L clear screen)
  1626.   then prefix the control letter with a ^ character. If you want to
  1627.   print double quotes, then use the \ character before the qoutes.
  1628.   If you want to print some special characters like the CSI ($9B),
  1629.   you can put a (hexa-)decimal number after the ^ character; you can
  1630.   separate it from the next character by a point (.) . Do not forget
  1631.   the ^J at the end of a line.
  1632.  
  1633. eg.     echo hello^J
  1634.         echo "Hello world !"
  1635.         echo Hello world !
  1636.         echo "^Lthe screen was just cleared^J"
  1637.         echo "^Lline 1^Jline 2^Jline 3^J"
  1638.         echo "these are double quotes ->\"^J"
  1639.         echo ^*33mColor^*32mful^J
  1640.         echo ^*4mUnderlined^*0mNormal^J
  1641.  
  1642. * Some common control codes are:
  1643.   ^7    ^G      bell (makes a DisplayBeep)
  1644.   ^10   ^J      linefeed.
  1645.   ^12   ^L      clear screen.
  1646.   ^13   ^M      carriage return.
  1647.   ^24   ^X      clear line.
  1648.   ^27   ^[      escape.
  1649.   ^$9b  ^*      CSI (command sequence introducer).
  1650. ============================================================================
  1651. ELSE
  1652.  
  1653. * ELSE marks the middle of an IF statement. All statements
  1654.   following it, and before the ENDIF statement will be executed
  1655.   only if the IF condition is FALSE. See IF for usage.
  1656. ============================================================================
  1657. ENDCLI [-C]
  1658.  
  1659. * Exits you from ZShell back to the AmigaDOS CLI prompt or Workbench.
  1660. * If the option "-c" was specified, it will clear ZShell as a
  1661.   resident: only in low memory situations needed.
  1662. * Instead of using ENDCLI you can simply press the ESC key or click
  1663.   on the close gadget, if available.
  1664.  
  1665. eg.   endcli
  1666.       endcli -c
  1667. ============================================================================
  1668. ENDIF
  1669.  
  1670. * ENDIF marks the end of an IF statement. See IF for usage.
  1671. ============================================================================
  1672. EVAL expression
  1673.  
  1674. OVERVIEW
  1675. ========
  1676.  
  1677.   Operators:
  1678.   + Add
  1679.   - Subtract
  1680.   * Multiply
  1681.   / Divide
  1682.   & Logical and
  1683.   ! Logical or
  1684.   = Poke into memory
  1685.   ? Peek out of memory
  1686.  
  1687.   Prefixes:
  1688.   + Positive number
  1689.   - Negative number
  1690.   % Binary number
  1691.   $ Hexadecimal number
  1692.   & Hexadecimal APTR converted to BPTR
  1693.   ! Hexadecimal BPTR converted to APTR
  1694.   ^ Filename containing number
  1695.  
  1696.  
  1697. * EVAL evaluates the "expression" as a reverse polish expression,
  1698.   and displays the answer in decimal and hex notation. Reverse
  1699.   Polish Notation (RPN) is used in Forth and in Hewlett Packard
  1700.   calculators (I have a HP48GX which has really a great functionality,
  1701.   but unfortunately is a one-way product: If something is defective, you
  1702.   have to throw it away in most cases).  It is based on how arithmetic
  1703.   is actually done at the lowest possible level. RPN allows calculating
  1704.   complex expressions without using brackets.
  1705.  
  1706. eg.     eval 4 5 +
  1707.   This gives the answer 9. When a number is found, it is "pushed"
  1708.   onto the arithmetic stack. The + always adds the last two numbers
  1709.   on the stack.
  1710.  
  1711. eg.     eval 7 2 3 + -
  1712.   This gives the answer 2. It is the same as (7 - (2 + 3)). See,
  1713.   7 is first pushed onto the stack, followed by 2, then 3. The +
  1714.   adds together the 2 and 3 and leaves the result 5 on the stack.
  1715.   Which means that the number 7 followed by 5 are left on the
  1716.   stack. The - subtracts the last entry (5) on the stack from the
  1717.   one before it (7), leaving the result 2.
  1718.  
  1719. eg.     12 * (3 + 9)                    > eval 12 3 9 + *
  1720.         (15 - 4) * (6 + 18)             > eval 15 4 - 6 18 + *
  1721.         (6 * ((87 + 13) / (2 * 25)))    > eval 6 87 13 + 2 25 * / *
  1722.  
  1723. * EVAL only performs 32 bit integer arithmetic.
  1724.   Negative numbers are prefixed with - .(hexadecimal they are
  1725.   shown as a 31 bit integer with bit 32 set, as usual)
  1726.   Prefixing positive numbers with + is optional.
  1727.  
  1728. eg.     eval +5 -3 +    {results in 2  hex:$00000002}
  1729.         eval -5 3 +     {results in -2 hex:$fffffffe}
  1730.  
  1731. * EVAL supports decimal, hexadecimal and binary  numbers.
  1732.   If you prefix the number with $, the number is hex
  1733.   If you prefix the number with %, it is binary.
  1734. Programmers: For BPTR-APTR conversion you can use & to specify
  1735.   a hexadecimal APTR when asked for a BPTR and vice versa with !.
  1736. eg.     eval $c00000 $a0 16 * +
  1737.  
  1738. * EVAL can also be used to perform base conversions (to dec or hex)
  1739. eg.     eval $ca
  1740.         eval %10110001
  1741.         eval 45
  1742.         eval &5a8
  1743.  
  1744. *  The & allows logical AND'ing. And ! allows logical OR'ing.
  1745.   The ? is similar to PEEK in BASIC.
  1746.   Conversely, = is similar to POKE in BASIC
  1747. eg.     eval $80 $21 $08 ! ! $aa &
  1748.         eval $67 %11001011 &
  1749.  
  1750.         eval $c00000 ?
  1751.   This prints out the long word in memory locations $c00000 - $c00003.
  1752.  
  1753.         eval $aa55aa55aa $40000 =
  1754.   This pokes the long word $aa55aa55aa into locations $40000 thru $40003
  1755.   and prints out what was in before.
  1756.  
  1757. * For environment handling you can specify the value of an
  1758.   environment variable with ^ followed by the name.
  1759.   To store the result in a variable, redirect the output.
  1760.  
  1761. eg.     eval >ENV:aa ^ENV:bb 1 +
  1762.   This adds 1 to the value in ENV:bb and stores the result in ENV:aa
  1763. * If the result was 0 an error (fail-level 10) will be returned.
  1764.   If it was negative, a warn (5) returns. (Not when redirecting output)
  1765. ============================================================================
  1766. EXECUTE [ZSHELL] source
  1767.  
  1768. * "EXECUTE source" executes the AmigaDOS script file of name "source"
  1769.   using an AmigaDOS shell, so no compatibility problems should occur.
  1770.   However in AmigaDOS scripts you cannot use ZShell-internal commands.
  1771.  
  1772. * To execute a ZShell script you have to set the S-protection flag
  1773.   and then you can execute it treating like a normal command
  1774.   or you have to use "EXECUTE ZSHELL scriptname".
  1775.   All ZShell commands, as well as commands from disk are valid within a
  1776.   ZShell script file.
  1777.  
  1778. * You can break scripts by pressing CTRL-D.
  1779.  
  1780. eg.   execute install_hard_disk
  1781.       execute zshell s:zstart
  1782. ============================================================================
  1783. FAILAT [failat_level]
  1784.  
  1785. * FAILAT sets the error code level at which scripts (and multiple
  1786.   commands on one line) will be aborted. The default level is 10.
  1787.   Most commands return 10 as an error, (20 for serious errors)
  1788.   while compilers returning Warning type errors will return 5.
  1789.   Hence, the default of 10 will allow Warnings to occur without
  1790.   the script (or line) being aborted. If a command returned an error
  1791.   code higher than the failat level, it will be printed out on the
  1792.   window.
  1793.  
  1794. eg.     failat 20       {sets failat level to 20}
  1795.  
  1796. * If you do not specify a failat level, the current setting is
  1797.   shown.
  1798.  
  1799. eg.     failat
  1800. ============================================================================
  1801. FAULT [error_number]
  1802.  
  1803. * FAULT displays a textual error message of the given DOS-error-number
  1804.  
  1805. eg.     fault 103
  1806.   (says something like "no free store", go and buy some extra memory :-)
  1807. ============================================================================
  1808. HELP [topic]
  1809.  
  1810. * HELP shows the lines of this manual corresponding to the topic.
  1811.   To see all topics available, type "HELP CONTENTS" . Make sure that
  1812.   the manual "ZShell.doc" is in the current directory or in S: !
  1813.   For some help about a command you can also type "commandname ?" .
  1814.   Type only "?" to read the manual with MORE.
  1815. Note: Instead of typing the topic you can type just some starting
  1816.       characters.
  1817. Note: The manual is only loaded once and will stay in memory till
  1818.       you use AVAIL -C or ENDCLI -C
  1819.  
  1820. eg.    help contents       {"help cont" will do the same}
  1821.        help copy
  1822.        makedir ?
  1823.        ?
  1824.  
  1825. * HELP without a topic lists the names of all available ZShell
  1826.   commands to the screen. This does not need the manual.
  1827.   HELP can also be invoked by hitting the HELP key.
  1828.  
  1829. eg.   help
  1830. ============================================================================
  1831. IF [NOT][WARN][ERROR][FAIL][EXISTS file]
  1832.  
  1833. * The IF command allows conditional execution of statements
  1834.   following it.
  1835. * If the condition specified is true, then execution continues
  1836.   after the IF statement until either an ENDIF or ELSE statement
  1837.   is encountered. If it is an ELSE statement, then all statements
  1838.   between the ELSE and the closing ENDIF are skipped.
  1839. * If the condition is false, then all statements after the IF and
  1840.   before either an ENDIF or ELSE statement are skipped. If an ELSE
  1841.   is encountered, then execution continues for all statements after
  1842.   the ELSE and before the closing ENDIF.
  1843. * IF can examine the state of the return code from the last command
  1844.   execute with WARN, ERROR, and FAIL tests. You can test for the
  1845.   non existence of such a state by including the optional NOT
  1846.   parameter.
  1847.  
  1848. eg.     IF WARN
  1849.            echo "last command returned warnings"
  1850.         ELSE
  1851.            echo "last command did not return warnings"
  1852.         ENDIF
  1853.  
  1854.         IF NOT FAIL
  1855.            echo "last command did not fail"
  1856.         ENDIF
  1857.  
  1858. * IF can also test for the existence of a file or directory.
  1859.  
  1860. eg.     IF EXISTS :system/format
  1861.            echo "this disk has a format command"
  1862.            echo "you can look yourself. I'm not joking"
  1863.         ENDIF
  1864.  
  1865.         IF NOT EXISTS ram:ed
  1866.            copy c:ed ram:
  1867.         ENDIF
  1868. ============================================================================
  1869. LAB label
  1870.  
  1871. * LAB specifies a destination (label) for the SKIP command.
  1872. ============================================================================
  1873. MEMCLK ON|OFF|ALARM
  1874.  
  1875. * MEMCLK is for using a clock shown in the border of the actual
  1876.   window. The current total free and chip free memory are also
  1877.   shown. It can do a DisplayBeep (short flash on all screens) at a
  1878.   specified time. The DisplayBeep can be converted into a sound
  1879.   by using a PD-utility for that or using Workbench 2.1+ .
  1880. * Programmers: There will be only one "MemClock"-Task, even if you
  1881.   run MEMCLK on many windows  -> memory and CPU saving.
  1882. * MEMCLK ON switches the clock on or does nothing if it already
  1883.   exist.
  1884. * MEMCLK OFF switches the clock off or does nothing if it does not
  1885.   exist.
  1886. * MEMCLK ALARM shows the alarm time. If you type a time (see DATE)
  1887.   after ALARM, you set the alarm time. (You cannot set an alarm date
  1888.   or multiple times.) ( MEMCLK A is the same as MEMCLK ALARM )
  1889.  
  1890. eg.     memclk on
  1891.         memclk off
  1892.         memclk alarm
  1893.         memclk a 21:34:07
  1894.  
  1895. * The clock can also be used on non-ZShell windows, but MAKE SURE
  1896.   that the clock is switched OFF BEFORE the window is CLOSED,
  1897.   otherwise you will see THE GURU (or an ALERT with OS2.0+)
  1898.   For example, to get a clock on the Workbench, type in ZShell
  1899.         wait 5;memclk on
  1900.   and press RETURN. Now you have 5 seconds to click on the Workbench
  1901.   screen. For removing use "wait 5;memclk off" .
  1902. ============================================================================
  1903. NEWCLI [-Wnew_window] [-Sstart_script] [-Ccommand] [-N] [-Hhelpfile] [-E]
  1904.  
  1905. * NEWCLI without arguments starts a new ZShell process.
  1906.   Things like paths, aliases and history buffer (!) will be copied to
  1907.   the new ZShell. The input/output window is created with the default
  1908.   specification. The startup script will be S:ZStart.
  1909. * "NEWCLI -Wnew_window" is used for opening a window with different
  1910.   specifications than the default. If you specify just "-W",
  1911.   there will be no window and output will be send to NIL: ; if there
  1912.   is input necessary, the ZShell process will just end (for
  1913.   example at a end of a script).
  1914. * "NEWCLI -Sstart_script" is used if the name of the startup script
  1915.   should be different from S:ZStart. If you specify just "-S", no
  1916.   script will executed.
  1917. * "NEWCLI -Ccommand" executes the command when starting. No script
  1918.   will be executed.
  1919. * See Start from CLI for more information about the options.
  1920.  
  1921. eg.     newcli
  1922.         newcli -wcon:30/30/400/50/Shell
  1923.         newcli -wcon:50/20/500/100/Hello -ss:shell-startup
  1924.         newcli -sram:doassigns -w
  1925.         newcli "-wcon:30/30/400/50/Great Shell" "-cecho Welcome !"
  1926. ============================================================================
  1927. PATH [-C] [path1] [path2] [path3] ...
  1928.  
  1929. * PATH defines the command search path used by ZShell when searching
  1930.   for disk based commands (see EXECUTING COMMANDS) .
  1931.   If you give the "-c" option, the old search path will be cleared
  1932.   and the new search path consist only of the given paths.
  1933.  
  1934. eg.     path -c c: ram:c df0: df1:
  1935.   This example will make it so that if you type a command which is
  1936.   not internal in ZShell, the resident list will be searched for it,
  1937.   then the current directory, then the c: directory, then the ram:c
  1938.   directory, then df0:, and finally df1:
  1939.  
  1940. * By omitting the -c option, you can add a number of paths onto the
  1941.   existing command search path.
  1942. eg.     path df2:c
  1943.         path df1:bin df1:myprogs
  1944.  
  1945. * If, however, you type path with no parameters, the current search
  1946.   path will be displayed.
  1947.  
  1948. * When starting ZShell the paths of Workbench (if available) will be
  1949.   copied.
  1950.  
  1951. Note: It is a crazy thing that AmigaDOS shell always has C: as last path.
  1952.   In my startup-sequence you can find something like:
  1953.   "path ram: c: sys:utilities sys:system s: sys:prefs"
  1954.   In AmigaDOS shell the C: directory will then be searched twice if a
  1955.   command could not be found. Only having C: as last path slows down
  1956.   access, because most commands are in C:.
  1957.   That is why you have to specify C: explicite in ZShell where you want it.
  1958. ============================================================================
  1959. PROMPT [string]
  1960.  
  1961. * If no parameter is typed, the current prompt setting will be shown.
  1962.  
  1963. eg.     prompt
  1964.  
  1965. * If a prompt string is specified, the current prompt setting
  1966.   will be changed to that string. The character "%" specifies a
  1967.   special prompt option:
  1968.  
  1969.     %p      Insert whole path of current directory.
  1970.     %s      Insert last part of the path of current directory.
  1971.     %n      Insert CLI number
  1972.     %l      Insert current input line number (for fun!)
  1973.     %c      Insert last command (for even more fun ! :-)
  1974.  
  1975. * You can use control sequences like in the ECHO command.
  1976.  
  1977. eg.     prompt "%p> "     {default prompt. Show current directory + ">"}
  1978.         prompt "%n.%s> "  {show CLI number, then current dir, then ">"}
  1979.         prompt Hello!     {shows "Hello!" at the start of every line}
  1980.         prompt %p^J^*32m> {Just try it!}
  1981. ============================================================================
  1982. QUIT [error_code]
  1983.  
  1984. * QUIT forces a script file to end, and return to the shell.
  1985.   An optional error code can be passed back (ie. 5=WARN 10=ERROR
  1986.   15=BAD 20=FAIL etc).
  1987.  
  1988. eg.     quit 5
  1989.         quit
  1990. ============================================================================
  1991. REVIEW [bytesize|-C|-Sfilename]
  1992.  
  1993. With the reviewbuffer you can see that again what scrolled out of the
  1994. window or was redirected. In the reviewbuffer are all outputs stored.
  1995. To see what is in the reviewbuffer just press SHIFT TAB. This activates
  1996. the MORE text reader.
  1997. * "REVIEW bytesize" (re)creates a reviewbuffer with the given size.
  1998. * "REVIEW 0" removes the reviewbuffer.
  1999. * "REVIEW" without arguments shows the adress and size of the current
  2000.   reviewbuffer.
  2001. * "REVIEW -C" clears the reviewbuffer.
  2002. * "REVIEW -S filename" saves the reviewbuffer to that file.
  2003.  
  2004. eg.     review 10000        {starts normal reviewbuffer}
  2005.         review 50000        {starts big reviewbuffer}
  2006.         review 0            {deletes reviewbuffer}
  2007.  
  2008. NOTE 1: Because it uses a circular buffer with fixed size, this is much
  2009.   faster than having a fixed number of lines. The decrease in scrolling
  2010.   speed is neglible.
  2011. NOTE 2: The Write function of the dos.library will be patched, so
  2012.   there might be problems with other programms that patch this too.
  2013. ============================================================================
  2014. RUN commandline
  2015.  
  2016. * RUN executes a commandline in a background task. If you want to
  2017.   execute several commands, you can separate them with \; .
  2018. * By default output goes to the current window. To surpress output or to
  2019.   get it into a file or onto a different window you can use redirection
  2020.   symbols like ">" (no output), ">filename" or ">w" (to a new window).
  2021.   In case of output redirection the launched background task will be
  2022.   totally independent from the task it is launched from.
  2023. * Input will be redirected to the same window output goes to. If you
  2024.   redirect output to a file, no input is possible (redirected to NIL:).
  2025.   Input redirection symbols does not make sense with the RUN command.  
  2026. * Because most things will be inherited to the new shell, you can use
  2027.   Aliases.
  2028.  
  2029. eg.     run copy fred.doc prt:
  2030.         run >prt: type barney.doc
  2031.         run >w dir df0:\;ask
  2032. ============================================================================
  2033. SETCLOCK LOAD|SAVE
  2034.  
  2035. * SETCLOCK only works if you have a battery backed up clock (BBUC).
  2036.   It accesses the adresses $DC0000 and I do not know if it works
  2037.   with very old or very new (A1200) clocks.
  2038. * SETCLOCK LOAD sets the systemtime (you can see the systemtime with
  2039.   DATE or MEMCLK) to the time in the BBUC (hopefully this is the
  2040.   right time).
  2041. * SETCLOCK SAVE first resets the BBUC, then stores the systemtime
  2042.   to the BBUC.
  2043.   To set the BBUC to the right time, use DATE to set the correct
  2044.   date and time, then use SETCLOCK SAVE.
  2045.  
  2046. eg.     setclock load
  2047.         setclock save
  2048. ============================================================================
  2049. SKIP label
  2050.  
  2051. * SKIP searches for the label within the current script file. If it
  2052.   finds it, execution continues from that point onwards. Labels
  2053.   are specified using the LAB command.
  2054.  
  2055. eg.     lab myloop
  2056.         dir ram:
  2057.         ask "list ram again? "
  2058.         if warn
  2059.            skip myloop
  2060.         endif
  2061. ============================================================================
  2062. STACK [size]
  2063.  
  2064. * Allows you to view or alter the current stack size.
  2065.  
  2066. eg.     stack            {shows the current stack size}
  2067.         stack 30000      {sets current stack = 30000 bytes}
  2068. ============================================================================
  2069. UNALIAS [alias1] [alias2] [alias3] [alias4] ...
  2070.  
  2071. * UNALIAS removes one or more alias definitions from the alias list.
  2072. * UNALIAS without arguments removes all aliases.
  2073.  
  2074. eg.     alias f1 "cd df0:;dir^M"
  2075.         alias f2 "cd df1:;dir^M"
  2076.         ...
  2077.         alias f10 "ed df1:s/startup-sequence^M"
  2078.  
  2079.         unalias f1 f2 f3 f4 f5 f6 f7 f8 f9
  2080.         ...
  2081.         unalias f10
  2082. ============================================================================
  2083. WAIT timeout
  2084.  
  2085. * WAIT halts processing for the time given. Timeout is in seconds.
  2086.   You can abort this with CTRL-C.
  2087.  
  2088. eg.     echo "I'll wait a minute"
  2089.         wait 60
  2090. ============================================================================
  2091. Comments
  2092.  
  2093. ; blah blah blah blah
  2094. * etc etc etc
  2095. # hello ma
  2096.  
  2097. * Placing a semi-colon, an asterisk or a hash character as the 1st
  2098.   character in the line of a script file allows you to place comments
  2099.   in it.
  2100.  
  2101. eg.   ; This is a comment line
  2102.  
  2103. * If you want to place a comment at the end of a line, you have to
  2104.   put ;# before it.
  2105.  
  2106. eg.   info;#to see something interesting
  2107. ============================================================================
  2108.  
  2109. ############################################################################
  2110.  
  2111. ============================================================================
  2112. Builtin Commands for Advanced Users
  2113.  
  2114. These commands are thought for users with a deeper knowledge of the
  2115. system. Maybe they are also useful for those not knowing of the system
  2116. internals. Just try the examples to find that out.
  2117.  
  2118. Break task_description [signalmask|C|D|E|F]
  2119. Config CTRLKEYS|MOREKEYS|DOT|HIDE|COLOUR|COPYSIZE|FNCSIZE|LOGFILE
  2120. DiskChange device
  2121. Flags [CHECK|MATCH|ICON|WILD|ERRORS|DEBUG|CUT|ALL|HIDE|PIPE] [ON|OFF]
  2122. GetMsg [portname]
  2123. Kill device|taskdescription
  2124. Locate [-C] [bptr|name] [READ|WRITE]
  2125. M [start_address] [end_address]
  2126. PutMsg port_description [number1|string1] [number2|string2] ...
  2127. Show D|I|L|M|P|R|S|T|V
  2128. Strings sourcefile [count]
  2129. TaskPri priority [task_description]
  2130. ============================================================================
  2131. BREAK task_description [signalmask|C|D|E|F]
  2132.  
  2133. * BREAK sets some signals at a given task
  2134. * task_description can be one of:
  2135.   - task/process name (case dependent !)
  2136.   - task/process adress
  2137.   - CLI-process number (one from 1 to 20)
  2138.   - zero (0) for this task
  2139.   It will be checked if the node-type field contains TASK or PROCESS
  2140. * signalmask is a longword; all bits, which should be signalled,
  2141.   must be 1 . Alternatively you can specify c,d,e or f to set
  2142.   the according signal to CTRL-C,-D,-E or -F. (CTRL-C is bit 12)
  2143. * BREAK without signalmask (and c,d,e,f) given sets all signals the
  2144.   task is waiting for.
  2145.  
  2146. eg.     break RexxMaster    {and it will be gone...}
  2147.         break Exchange c    {Exchange will get itself off too}
  2148.  
  2149. eg. If 2 ZShells are running. The one with the CLI-number 1 (get that
  2150.     out with prompt %n) lists a very large directory. You can break
  2151.     that by using the other ZShell typing:
  2152.         break 1 c
  2153.     Thats the same like you pressed CTRL-C on the ZShell number 1.
  2154. ============================================================================
  2155. CONFIG CTRLKEYS|MOREKEYS|DOT|HIDE|COLOUR|COPYSIZE|FNCSIZE|LOGFILE
  2156.  
  2157. This command is for changing the default settings.
  2158.  
  2159. * CONFIG CTRLKEYS is for command-line-editing-keys-definitions
  2160.   (great word :).  In other words: You can change the meaning of keys
  2161.   pressed with CTRL (Control) key and some other keys (TAB ^I,
  2162.   Backspace ^H, Return ^M, Shift-Return ^J, ESC ^[).
  2163.  
  2164.   "CONFIG CTRLKEYS" shows the current settings,
  2165.   "CONFIG CTRLKEYS WQSEIX[TYHJMLRVFP" sets the default settings.
  2166.  
  2167.   To change something, just change the character corresponding to
  2168.   the key pressed with CTRL. See some lines above for some CTRL-
  2169.   equivalents.
  2170.   eg. TAB is same as CTRL-I . So to use CTRL-K instead of TAB, you use:
  2171.         config ctrlkeys WQSEKX[TYHJMLRVFP
  2172.   Warning: You may get confused if you define one key twice.
  2173.   If you want to get really confused, try:
  2174.         config ctrlkeys WQSEKX[TIYMJHRVFP
  2175.  
  2176. * "CONFIG MOREKEYS" shows the keys that can be pressed inside MORE.
  2177.   The uppercase keys represent the cursor keys, default is: ABCDSTqsnjwrh
  2178.   It works similar to CONFIG CTRLKEYS. To use RETURN key to exit MORE use:
  2179.         config morekeys ABCDST^Msnjwrh     (see also ECHO)
  2180.   
  2181. * "CONFIG DOT character" replaces the dot character (.) where it has a
  2182.   special meaning (ECHO,SEARCH,PUTMSG, dir back, force disk, abbreviation)
  2183.   eg.   config dot *
  2184.  
  2185. * "CONFIG HIDE pattern" sets the files that are hidden by DIR
  2186.   and filename completion. The pattern must contain at least
  2187.   one wild card.
  2188.   "CONFIG HIDE" shows the current settings (by default none).
  2189.  
  2190.   eg.   config hide         {display current hiding pattern}
  2191.         config hide ""      {unset the hiding pattern}
  2192.         config hide *.info  {ignore *.info-files}
  2193.         config hide *.info|*.bak {hide files ending in .info and .bak}
  2194.         config hide ~*.tex|*.dvi {show only *.tex and *.dvi-files}
  2195.  
  2196. * "CONFIG COLOUR colours" defines the use of colours. "colours" has to be
  2197.   a 8 digit number. The digit at position x defines to what colour number
  2198.   the default colour x is mapped to. Everything clear ? (I think no!)
  2199.   Thsi is global. Do not forget to make a CLS afterwards.
  2200.   eg.   config colour 01234567   {sets the default colours}
  2201.         config colour 01111111   {switches to one colour mode, very useful
  2202.                                   with OS3.0+ to speed up scrolling}
  2203.         config colour 01233321   {if you want to use only 4 colours}
  2204.  
  2205. * "CONFIG COPYSIZE bytesize" sets the size of the memory block used for
  2206.   COPY, MOVE and SPLIT to "bytesize" bytes. The default setting 50000
  2207.   semms to be a good value for both harddisk and floppydisk. If you
  2208.   only use floppydisk try:
  2209.         config copysize 20000
  2210.   and to display the current setting use:
  2211.         config copysize
  2212.  
  2213. * "CONFIG FNCSIZE bytesize" sets the size of the memory block used to
  2214.   store the last used directory at filename completing (=FNC).
  2215.   If this memory block (=FNC buffer) is too small, FNC has to read the
  2216.   directory again every time you press TAB and TAB cycling does not work.
  2217.   To save memory you can try:
  2218.         config fncsize 2000      for 2000 bytes FNC buffer or
  2219.         config fncsize 0         for no FNC buffer at all
  2220.   and to display the current setting use:
  2221.         config fncsize
  2222.  
  2223. * "CONFIG LOGFILE filename" opens a global logfile which is used by all
  2224.   ZShells running. You will be asked for your name.
  2225.   Every command line will go there including date, time and CLI process
  2226.   number. The logfile will be closed if all ZShells end.
  2227.   "CONFIG LOGFILE" closes the logfile manually.
  2228. ============================================================================
  2229. DISKCHANGE device
  2230.  
  2231. * Needed for devices which do not detect a diskchange.
  2232.  
  2233. eg.     mount rad:;diskchange rad:
  2234.   Makes your rad:-disk appear on the Workbench.
  2235.         diskchange ram:
  2236.   If the ram-disk does not exist yet, the handler will be started
  2237.   (and the ram-disk can appear on Workbench when done before LOADWB)
  2238. ============================================================================
  2239. FLAGS [CHECK|MATCH|ICON|WILD|ERRORS|DEBUG|CUT|ALL|HIDE|PIPE] [ON|OFF] ...
  2240.  
  2241. * With this you can configure some things. Use FLAGS without arguments
  2242.   to see the current settings. The meaning of the keywords are:
  2243.  
  2244. CHECK: (default off) Activates or deactivates the programmers status line.
  2245.   It is intended to debug external commands.
  2246.   The status line (if activated) will only appear once a disk based
  2247.   or resident program has been executed. The line appears as follows:
  2248.   Result2: 0  time = 00:00:23.66  changes-> chip: 0  fast: 0  total: 0
  2249.   Result2 shows the error code that can be asked for with IoErr.
  2250.   Time shows how long the program took to execute in hours,
  2251.   minutes, seconds, hundredths (This time does NOT include the time
  2252.   it takes to load the program from disk). Changes show if the program
  2253.   has left any memory still allocated. i.e. if 200 bytes of chip
  2254.   memory were left allocated by the program, then you see "chip: -200".
  2255.   The Return code (the program returns in D0) is shown as Fail-Level.
  2256.   It also does some low memory checks on 68000 CPU systems. Be warned if
  2257.   a "Changed ..." appears. Like Mungwall it sets address 0 to $C0DEDBAD.
  2258.  
  2259. MATCH: (default on) By default Filenamecompletion shows all files that matches
  2260.   the given pattern. You can switch this off by using "FLAGS MATCH OFF".
  2261.  
  2262. ICON: (default off, OS2.0+) This enables iconifying when pressing ESCAPE
  2263.   or clicking the Close-Gadget. To exit from ZShell use ENDCLI.
  2264.   You need Workbench running and ZShell must have opened its own window
  2265.   (start from Workbench, start with newcli or used -W when started from
  2266.   CLI).  When iconifying, a icon is created on the Workbench and the
  2267.   window is closed. Double-clicking on this icon or dragging a file into
  2268.   it pops ZShell up again. Use the ToolTypes "ICONNAME", "XPOS" and
  2269.   "YPOS" to determine the name and position of the icon.
  2270.   ToolType "ICONIFY" lets ZShell start in iconifyed mode.
  2271.  
  2272. WILD: (default on, OS2.0+) By enabling this, you force ZShell to use
  2273.   AmigaDOS wildcard-patternmatching instead of the internal matcher.
  2274.   Switch this off if you like the internal matcher better.
  2275.  
  2276. ERRORS: (default off) Most external commands show their errormessages
  2277.   themselves, so you often see double error messages. Using ERRORS you can
  2278.   switch off this behaviour, but you risk to miss some errormessages !
  2279.   If you see a large errornumber, this command assumed that there will be
  2280.   no error-output and does not set the correct errorcode --- this is
  2281.   badly programmed !
  2282.  
  2283. DEBUG: (default off) This is for testing/debugging script-files. Switching
  2284.   DEBUG to ON, the commands from the script appear on the window as they
  2285.   are processed (you need to execute the script for that, ofcourse),
  2286.   and redirection will be ignored (so you will see even output to >NIL: ).
  2287.  
  2288. CUT: (default on) For MORE. If ON, lines longer than the window will be
  2289.   cutted at the end. If OFF, too long lines will wrapped to next line.
  2290.  
  2291. ALL: (default on) Enables the substitute ALL for the option -R.
  2292.   Note that -R must be the first argument (or second after -Q) and ALL
  2293.   must be the last argument.
  2294.   (Only in this release you can place ALL anywhere you like)
  2295.  
  2296. HIDE: (default on) When on the cursor will be hidden for outputting. This 
  2297.   improves scrolling speed. Switching off is only thought for debugging.
  2298.  
  2299. PIPE: (default on) If ON, real pipes will be used, pseudo pipes otherwise.
  2300.   See Anonymous Pipes for more.
  2301.  
  2302. eg.     flags icon on all off
  2303.         flags errors off all off check on
  2304.         flags e. off a. off ch. on          {same as above}
  2305. ============================================================================
  2306. GETMSG [portname]
  2307.  
  2308. * GETMSG waits for a message arriving at the process-internal
  2309.   messageport (pr_MsgPort). The message will be shown, strings
  2310.   will be tried to detected (this could cause lots of enforcer hits).
  2311.   Then you will be asked if to reply the message. "y" replies it
  2312.   and should be used normally. "e" replies and gets back to waiting
  2313.   mode again. Abort waiting is possible with CTRL-C.
  2314. * "GETMSG portname" gives the process-internal port the given name.
  2315.   Then it behaves as described above.
  2316. * See PUTMSG for examples.
  2317. ============================================================================
  2318. KILL device|taskdescription
  2319.  
  2320. * KILL lets the handler of a device (name ending in ":") end itself.
  2321.   It seems not to work with most handlers. Works with CrossDOS
  2322. * It can remove tasks too, but this will likely crash, because it is
  2323.   NOT SYSTEMCONFORM ! See BREAK for taskdescription.
  2324.  
  2325. eg.     kill PC0:
  2326.         kill Exchange
  2327. ============================================================================
  2328. LOCATE  [-C] [bptr|name] [READ|WRITE]
  2329.  
  2330. * "LOCATE lockadress" (lockadress is a BPTR) shows information about
  2331.   that lock structure. fl_Access must be -1 (write) or -2 (read).
  2332. * "LOCATE filename_or_dirname READ" gets an ACCESS_READ lock structure on
  2333.   that file/dir.
  2334. * "LOCATE filename_or_dirname WRITE" gets an ACCESS_WRITE lock structure
  2335.   (exclusive lock) on that file/dir. This cannot be shown correctly,
  2336.   otherwise it would not be exclusive.
  2337. * "LOCATE -C lockadress" unlocks (removes) the lock structure (BPTR !).
  2338. * "LOCATE" shows all locks that are in system. Since OS2.0 this cannot
  2339.   show correctly all locks on RAM: because it is some kind of hack.
  2340.  
  2341. eg.     locate &21f45c        {shows lock on adress $21f45c}
  2342.         locate $9f5b7         {shows lock with BPTR $9f5b7}
  2343.         locate -c $9f5b7      {removes this lock}
  2344.         locate ram:rdit read  {tries to read-lock ram:rdit}
  2345.         locate c:mount write  {tries to write-lock c:mount}
  2346.         locate                (shows all locks in system}
  2347. ============================================================================
  2348. M [start_address] [end_address]
  2349.  
  2350. * M is a memory contents dumping command.
  2351. * Typing M with a start and end address will display the hex and
  2352.   ASCII contents of those bytes in the memory locations specified.
  2353. * Typing M with only a start address will display 160 bytes
  2354.   starting at the location specified.
  2355. * Typing M with no parameters will display 160 bytes starting
  2356.   from the current memory location.
  2357. * The current memory location is always one location higher than
  2358.   the last location shown by a prior M command.
  2359.  
  2360. eg.   m $70000 $77fff
  2361.       m $fc0000
  2362.       m
  2363. ============================================================================
  2364. PUTMSG port_description [number1|string1] [number2|string2] ...
  2365.  
  2366. * PUTMSG is useful for testing programms which wait for a message,
  2367.   or to reactivate a task that waits for a message which will never
  2368.   arrive. PUTMSG sends a message to the given messageport.
  2369. * port_description can be given in 5 (!) ways:
  2370.   - Name of the messageport
  2371.   - Adress of the messageport
  2372.   - 3 ways of a task_description, see BREAK. This MUST be a Process
  2373.     because the process-internal messageport will be used.
  2374. * number|string is a longword number or a string. If it is a number,
  2375.   it will just be added to the message. If it is a string, a
  2376.   adress pointing to this string will be added to the message.
  2377.   If number1|string1 was a point (.), the message will be initialized
  2378.   as an DOS-Packet.
  2379. * After sending the message PUTMSG will wait for the reply and show
  2380.   that reply like GETMSG. Abort waiting with CTRL-C.
  2381. WARNING: Your machine might CRASH if you send a message to a
  2382.   (Process-internal) port that is not waiting for this message.
  2383. NOTE: PUTMSG without arguments makes a DisplayBeep (even without a
  2384.   window) and outputs the internal register value of A5.
  2385.  
  2386. eg.     putmsg testtask $21fd68 12
  2387.         putmsg testport "Hello World!"
  2388.  
  2389.   If you have 2 ZShells, execute in the one with CLI-number 1
  2390.   "getmsg". Activate the other shell and type
  2391.         putmsg 1 "like some chatting ?"
  2392.   The ZShell no. 1 should display that and prompt "reply ?". Answer
  2393.   "y" and the message goes back again.
  2394.   Now try "getmsg wurgutz" at one ZShell and "putmsg wurgutz $abcd"
  2395.   on the other. Do not forget to reply.
  2396.  
  2397. * You can use PUTMSG to use the AREXX interface of a programm. This
  2398.   works with some programms even with OS1.3- and no AREXX-Package.
  2399. eg.     putmsg showdvi 0 0 0 0 0 "tofront" {gets ShowDVI to front}
  2400.   Instead of the first 0 you sometimes must write the adress of
  2401.   this task. If available replace the second 0 with a pointer to
  2402.   the rexxsyslib.library. The third 0 is called rm_Action. I do not
  2403.   know what it is for. The fourth and fifth are results, only
  2404.   interesting in the reply.
  2405. eg.     putmsg showdvi 0 0 0 0 0 "loadnew tex.dvi"
  2406.  
  2407. * Specify a point as first number if you want to send a DOS-Packet.
  2408. eg.     putmsg DF0 . 0 1023 0 0 -1     {same as LOCK DF0: ON}
  2409.   If you get $FFFFFFFF as 4th longword, it was successful.
  2410.  (with OS1.3- you need to use FileSystem instead of DF0)
  2411. ============================================================================
  2412. SHOW D|I|L|M|P|R|S|T|V
  2413.  
  2414. * Shows some information about important exec-lists:
  2415.   - Devices
  2416.   - Interrupts
  2417.   - Libraries
  2418.   - Memory
  2419.   - Ports (MessagePorts)
  2420.   - Resources
  2421.   - Semaphores
  2422.   - Tasks (and Processes)
  2423.   - Vectors for reset-resident programs
  2424.   Use the first character of one of them as argument.
  2425. * The output means:
  2426.   - Adress: hexadecimal start adress of the structure
  2427.   - Pri   : Priority, often unused
  2428.   - Ver   : Number of version  (only with D,L,R)
  2429.   - Rev   : Number of revision (only with D,L,R)
  2430.   - Name  : Name
  2431.   - State : Task state (only with T)
  2432.   - SignWait : Signals, a waiting task waits for (only with T)
  2433.   - PT    : Pr means Process, Ta means Task, Tm means Task with
  2434.             Messageport like Process     (only with T)
  2435. * If displaying the tasklist, the CLI-number (-> CLI ?:) and the
  2436.   loaded command will be shown at processes with cli-structure.
  2437.   ">" stands for output-redirected, "<" for input-redirected.
  2438.   "Bg-CLI" means background CLI.
  2439. * SHOW V displays some important execbase pointers, which give a
  2440.   good indication of whether a virus is present in your system.
  2441.   WarmCapture, CoolCapture, ColdCapture, KickTagPtr, KickMemPtr,
  2442.   and KickCheckSum are displayed. If any of these are are NOT
  2443.   zero, then either a virus, RAD, or virus protector or some
  2444.   other program that takes control of your machine when you
  2445.   reset, is present.
  2446.  
  2447. eg.     show d          {have a look at the device-list}
  2448.         show Devices    {same as above}
  2449.         show t          {This is REAL MULTITASKING ! :) }
  2450. ============================================================================
  2451. STRINGS sourcefile [count]
  2452.  
  2453. * STRINGS displays all valid ASCII strings in a file which have a
  2454.   length greater than or equal to the count. If no count is given,
  2455.   a default of 10 characters is used.
  2456. * This command is very useful for finding out which libraries a
  2457.   program uses.
  2458.  
  2459. eg.     strings c:zshell 20
  2460.         strings c:mount
  2461. ============================================================================
  2462. TASKPRI priority [task_description]
  2463.  
  2464. * TASKPRI sets the priority of a task, it can be displayed using
  2465.   "SHOW T". The priority must be between -127 and 128 and should
  2466.   be within -50 and 20 to avoid system-hangups. Standard is 0 .
  2467. * task_description is same as described at BREAK.
  2468. * With one argument TASKPRI sets the priority of this task.
  2469. * If task_description is given, TASKPRI sets the priority of the
  2470.   given task.
  2471. NOTE: I did not like to call this command CHANGETASKPRI, because
  2472.       this name is really too long.
  2473.  
  2474. eg.     taskpri 2       {This task will be preferred}
  2475.         taskpri -1 3    {affects CLI no. 3}
  2476.         taskpri 4 Workbench
  2477. ============================================================================
  2478.  
  2479. ############################################################################
  2480.  
  2481. ============================================================================
  2482.  
  2483. ############################################################################
  2484.  
  2485. ============================================================================
  2486. Changes
  2487.  
  2488. UP TO V1.3:See the source code of the ZShell V1.3 release
  2489.            (for example on FISH disk 537).
  2490.            Author: Paul Hayter
  2491.            Source: 103 KByte, Executable: 13 KByte, Doc: 32 KByte.
  2492.  
  2493. V2.0:There were so many changes, I think there is no sense in listing
  2494.      them all here, because it may be longer than this document. So just
  2495.      read this document or the source code.
  2496.      All changes since V1.3 made by Martin Gierich. Released 14.10.94.
  2497.      Source: 180 KByte, Executable: 25 KByte, Doc: 72 KByte.
  2498.  
  2499. V2.1  11.12.94:
  2500.     * IMPORTANT FOR THOSE WHO USED ZSHELL V2.0: Do not start ZShell V2.1 *
  2501.     * if ZShell V2.0 is resident. This will crash your machine !         *
  2502.     * Do not use ZSH V2.0 with ZShell V2.1 and vice versa.               *
  2503.   - Added a review buffer to see that again what scrolled out of the
  2504.     window. A scrollbar will probably added in future.
  2505.   - Changed default CTRL-keys; added 2 new CTRL-keys (see HISTORY).
  2506.   - Changed usage of MORE (you can still use the cursor keys).
  2507.   - DIR now hides all these files that Filenamecompletion ignores.
  2508.   - Some bugs found with mungwall and scratch are fixed.
  2509.  
  2510. V2.2  03.01.95:
  2511.   - Fixed a REALLY NASTY BUG that trashed taskswitching when closing ZShell.
  2512.   - AmigaGuide-Documentation added !
  2513.   - RUN-Command added !
  2514.   - NEWCLI has a new argument template.
  2515.   - CTRL-J = Shift-RETURN puts the command line in History
  2516.     buffer without executing.
  2517.   - PROMPT now knows the args %s and %c :-) . Default Prompt
  2518.     changed to "%s> ".
  2519.   - Better building of the CLI-Interface when starting from WB.
  2520.   - Now the Pseudo-Assign PROGDIR: is provided (OS2.0+ only).
  2521.   - LIST -Q -R also works; DIR can also list recursive.
  2522.   - ECHO Hi There ! will now do the same as ECHO "Hi There !" .
  2523.   - Improved options when starting from CLI.
  2524.  
  2525. V2.3  10.02.95:
  2526.     This time there are some real new features. Because now I have my
  2527.     OS3.1 Autodocs and Includes, I have added several features that can
  2528.     only be used with OS2.0+. There will be done version-checkings before
  2529.     using OS2.0+ specific stuff, so no need to be afraid of crashes.
  2530.   - New Commands: MAKEICONMAKELINKFLAGS and MOVE.
  2531.   - DELETECOPYMOVEPROTECT and JOIN are fully rewritten !
  2532.     They now all use the directory-lister (for LIST and DIR)
  2533.     and therefore all support wildcards and recursive processing !
  2534.   - PATH-Command is now AmigaDOS compatible.
  2535.     Paths from Workbench are duplicated on starting from Workbench.
  2536.   - Support of Hardlinks and Softlinks by MAKELINKLIST and DIR.
  2537.   - ASSIGN supports ADD, REMOVE, PATH and DEFER.
  2538.   - Redirection improved: Can also be redirected to MORE.
  2539.   - Can be iconified to an ApplicationIcon (see FLAGS).
  2540.   - Erroroutput is done by DOS.
  2541.   - DELETE DEVICE formats a disk quick,
  2542.   - DELETE FORCE ignores delete-protection-bits.
  2543.   - Filenamecompletion can show all matching files.
  2544.   - MORE supports "more keys" and checks windowsize.
  2545.   - ALIAS can work without surrounding quotes; now you
  2546.     have to remove \ before " ,sorry for any incompatibilities.
  2547.   - CHECK is moved to FLAGS, VEC is moved to SHOW V.
  2548.   - RESET removed: It was a hack ! RECOPY removed: Has anybody needed it ?
  2549.   - First line in Command History is the last changed line.
  2550.   - You can use ^* instead of ^$9b with ECHO and PROMPT.
  2551.   - Really faaaast searching in MORESEARCH and HELP.
  2552.   - Bugfix and new options when starting from CLI.
  2553.   - New Tooltypes for starting from Workbench.
  2554.   - HELP only searches the current dir and S: for the manual.
  2555.  
  2556.   Now there is not much of the original V1.3 release left, because most
  2557.   of the old parts are totally rewritten and size has more than doubled !
  2558.  
  2559. V2.4  28.02.95:
  2560.     Important bugfixes made !
  2561.   - Application-Window allows dropping Workbench-Icons into ZShell-Window; OS2.0+
  2562.   - Check-Flag checks writes to low memory
  2563.   - SHOW task shows redirection/background
  2564.   - DIE task removes task
  2565.   - COPY uses dots as progress indicator
  2566.   - If an error during starting occurs, there will be an errormessage
  2567.   - Sets Wildstar-Flag in System, so you can use "*" instead of "#?"
  2568.     with all commands; OS2.0+
  2569.   - Hide-Flag added.
  2570.   - Lots of bugfixes
  2571.  
  2572. V2.5  11.04.95:
  2573.   - Localized most messages using the catalog of AmigaDOS, so no
  2574.     translating required (and I do not have to look for translators :-) ; OS2.1+
  2575.   - Pressing CTRL-F a filerequester pops up; OS2.0+
  2576.   - Possible to open own Public Screen on starting; OS2.0+
  2577.   - EXECUTE uses AmigaDOS Shell for executing scripts
  2578.     and therefore no longer causes compatibility problems. To execute
  2579.     ZShell-scripts: set S-protection flag and use it like a command.
  2580.   - Correct inserting of strings when pressing function-keys or dropping
  2581.     an Icon on Window/AppIcon
  2582.   - Removed C: as default path. This was a stupid idea
  2583.     I got from the AmigaDOS Shell. It is better to have C: as first path.
  2584.   - You can use textfiles/Amigaguides with E-flag set like a command.
  2585.     It will then be displayed using amigaguide.library. With OS3.0+
  2586.     this even works on everything supported by your datatypes (like pics)
  2587.   - Problems with foreign characters hopefully fixed
  2588.   - NEWCLI and RUN now copy stacksize, appiconname and windowname
  2589.   - Bugfixes: ASSIGN, DIR/LIST, DELETE DEVICE
  2590.   - ToolType ICONIFY fixed. It has NEVER worked !
  2591.   - Starting ZShell chapter improved
  2592.   Source: 217 KByte, Executable: 31 KByte, Guide: 104 KByte.
  2593.  
  2594. V2.6  02.06.95 (was not on Aminet):
  2595.   - Commands changed:
  2596.     HTYPE filename [offset]
  2597.     LOCATE [-C] [bptr|name] [READ|WRITE]
  2598.     CONFIG CTRLKEYS|MOREKEYS|DOT|HIDE|COLOUR|COPYSIZE|FNCSIZE
  2599.   - New Command: SPLIT source dest length [offset]
  2600.   - Filename completion now reads directory to
  2601.     memory to decrease access time. It is now fine to use on floppy disks,
  2602.     too. By pressing TAB multiple times you can cycle through the matches.
  2603.   - No more problems to delete the last used directory, because "dir back"
  2604.     (a single point as command) uses a string instead of a lock.
  2605.   - Showing files using Amigaguide does not check for the E-protection-
  2606.     flag anymore
  2607.   - Use ESC or Q key to quit MORE
  2608.   - String comparison in Filename completion and DIR/LIST is now localized
  2609.   - OS2.0+: AmigaOS wildcards are used (they are localized). They are a
  2610.     bit different. To get back the internal ones use: FLAGS WILD OFF
  2611.   - Default prompt is now "%p> " again (something has to be changed :-)
  2612.   - New Tooltype: HELPMAN , new CLI option: -h
  2613.   - Options can be overridden by surrounding them with quotes
  2614.   - Bug fixes: DEL key, FLAG CHECK -> locks, scripts ending in LF
  2615.  
  2616.  
  2617. V2.7 14.08.95:
  2618.   - Support of anonymous pipes. You can choose between
  2619.     real and pseudo pipes using FLAGS PIPE.
  2620.     Multiple pipes and aliases are also supported.
  2621.     All internal commands can be left to "|".
  2622.   - Internal commands that can take data from standard input (stdin)
  2623.     (can be right to "|" only when using pseudo pipes):
  2624.     MORE, TYPE, HTYPE, STRINGS, SEARCH, EXECUTE ZSHELL
  2625.   - EXECUTE ZSHELL scriptname executes a ZShell script
  2626.   - RUN command outputs to current window,
  2627.     RUN >filename command outputs to filename
  2628.   - Redirection >W opens a window
  2629.   - MORE: Key N searches next occurence of searchstring
  2630.   - PROTECT: You can use = similar to + or -, reduced disk access
  2631.   - FLAGS CHECK ON does not count locks anymore, use LOCATE instead
  2632.   - MAKELINK: HARD is default, SOFT must be specified explicitely
  2633.   - DELETE dirname ALL deletes contents of the directory, then tries to
  2634.     remove the directory
  2635.   - CTRL-P flushes FNC-buffer (useful on CrossDOS disks)
  2636.   - Default prompt is now "%s> " again
  2637.   - EVAL uses now different symbols
  2638.   - Bugfixes (Thanks to Christian and Timothy who reported most of them)
  2639.  
  2640. V2.8 25.08.95:
  2641.   - Filename completion accepts wildcards
  2642.   - Support of logfiles, see CONFIG LOGFILE
  2643.   - No space before pipe symbol | needed, use \| to get |
  2644.   - Better handling of \ and of rediretion names
  2645.   - New chapter: Command Line Parser
  2646.   - CTRL-F behaves similar to Filename completion  
  2647.   - MEMCLK uses correct font
  2648.   - Probably added some brand new nasty bugs and left some ugly old bugs :)
  2649.   - And what is best: Improved versionnumber !  ;-) 
  2650.  All changes since V1.3 made by Martin Gierich.
  2651. ============================================================================
  2652. Known Problems
  2653.  
  2654. Here are listed known bugs and odd behaviours.
  2655. * CrossDOS
  2656.   With MessyDOS being one big bug, the MessyDOS filesystem is part of
  2657.   a bug. :-) This means not all things AmigaDOS supports, is supported
  2658.   by CrossDOS, too. Especially Protection bits are different,
  2659.   and Filenotes are not supported. Not to mention the 8+3 filename limit.
  2660.  
  2661.   A further problem is the missing date-of-last-change of the disk.
  2662.   Without this FNC cannot determine whether something on the disk has
  2663.   been changed and even not whether the whole disk has been changed.
  2664.   So you have to update FNC manually by pressing CTRL-P after a change.
  2665.  
  2666. MORE
  2667.   If you are on the last page, scroll up some lines and scroll down some
  2668.   lines again, you will notice a weird behaviour. This is hard to fix.
  2669.  
  2670. ALIAS
  2671.   alias list dir ; alias dir list
  2672.   does not exchange "dir" and "list", because nested aliases are allowed.
  2673.   This is not a bug, this is a feature !
  2674.  
  2675. Review-Buffer
  2676.   Some commands, especially OS2.0+ only, use other ways to output text
  2677.   than dos.library's Write(). As a result this output will not appear
  2678.   in the review-buffer. Probably this will be fixed in future.
  2679.  
  2680. DELETE
  2681.   If you want to delete a link, you have to describe it with wild cards,
  2682.   otherwise the original file will be deleted, because the system
  2683.   resolves links automatically. I do not have an idea how to work
  2684.   around it.
  2685.  
  2686. MOVE
  2687.   You have to make sure that the destination directory is not moved to
  2688.   itself like in "move * temp/". Maybe there are more strange behaviours
  2689.   in the MORE command, I am waiting for bug-reports. :-)
  2690.  
  2691. * DIR, LIST, COPY, DELETE etc.
  2692.   Directories nested very much, about more than 50 levels, and using
  2693.   recursive option to scan them, cause ZShell to crash. Still looking
  2694.   for the bug.
  2695.  
  2696. * If you type a command and press Return while an other command (like DIR)
  2697.   outputs on the window, it will appear after the next prompt, but it
  2698.   will just be put in the history buffer without executing it. Sorry,
  2699.   there is no way to fix this, because the Return above is treated as
  2700.   Shift-Return by the system. Two solutions:
  2701.   1.) Press cursor up (last line in history) and then press Return
  2702.   2.) Use "config ctrlkeys WQSEIX[TYHKJLRVFP". With this Shift-Return
  2703.       will be the same as Return and CTRL-K will be what Shift-Return
  2704.       was before.
  2705.  
  2706. Filename completion
  2707.   If you have a filename with a space in it, you have to make sure you
  2708.   type the quotes around it by yourself, this can hardly be done
  2709.   automatically. Press CTRL-F instead of TAB in these cases.
  2710.  
  2711. PATH
  2712.   If you have multiple assigns (ASSIGN ADD) to your C: (or another)
  2713.   directory, PATH will accept only the first one. Add the other
  2714.   directories to the path by using "path directoryname".
  2715.  
  2716. Parser
  2717.   \" is converted to " only in some commands like ECHO and ASK,
  2718.   but it is not treated as quote, too.
  2719. ============================================================================
  2720. Possibilities for Future Improvements
  2721.  
  2722. Planned for next version:
  2723. New documentation written by Timothy.
  2724. (Hi Timothy, mailing you does not work, please try to mail me.)
  2725.  
  2726. Other ideas/suggestions:
  2727. * GUI for configuring
  2728. * Quick directory changes by using a database
  2729. * Full XPK-support
  2730. * Scrollbar for review-buffer (this will be difficult)
  2731. * Add more commands to the directory-lister (like makeicon,search)
  2732. * Make KILL a real killer (windows, screens)
  2733. * MAKEDIR can create nested dirs: If RAM: is empty "makedir ram:a/b/c"
  2734.   would create directory c in b in a in RAM: .
  2735. * HEX option for MORE.
  2736. * Applly configurable menues to the window
  2737. * More options for the LIST command (especially LFORMAT).
  2738. * Remove PUTMSG and GETMSG
  2739. * COMPARE or DIFF command
  2740.  
  2741. Less probable:
  2742. * COPY asks to remove incomplete destination files.
  2743. * RENAME command with wildcard support: "rename *.asm *.s" would rename
  2744.   all files ending in .asm to the same name ending in .s !
  2745. * Make it a commodity with hotkey.
  2746. * Improve internal script file execution, like passing arguments,
  2747.   allow subroutine scripts and commands like FOR.
  2748. * Include MOUNT/INSTALL command.
  2749. * Faster scrolling (jump scroll/1 bitplane scroll)
  2750. * Patch for 68000-Processors to be as fast as 68060/50MHz-Processors ;-)
  2751. * Write a stripped-down version for MessyDOS; after starting this would say:
  2752.   This is ZShell V2.x *** Fatal error: no multitasking system !  ;-)
  2753.  
  2754. If you want to see these or other improvements made, please write to me.
  2755. If you do not, please write to me, too :-)
  2756.  
  2757. Note that there is a (about) 32K limit of the executable, because I only
  2758. use relative addressing (like in small code model). So suggestions what
  2759. to remove are also welcome.
  2760.  
  2761.  
  2762. I thought about making a separate version for OS2.0+:
  2763.  
  2764. Command-line-editing and review stuff could be done best (most powerful)
  2765. within a console-handler; there are already several available (as I know,
  2766. the only one that is Freeware is KingCon), so I do not want to write 
  2767. another one. The disadvantages of these I have seen is that you need to
  2768. change alot between mouse and keyboard and they are somehow slow on my
  2769. system (and do not work on OS1.3- systems) and memory-hungry.
  2770.  
  2771. Except for Command-line-editing and review, the inbuild commands are a
  2772. main advantage of ZShell. These commands could be moved to one executable
  2773. file; if this file was executed, it would create all inbuild commands
  2774. as resident commands that could be used by the normal Shell.
  2775. (This would be somehow like the MessyDOS COMMAND.COM file.)
  2776. So if you used this file and a separate console-handler, you could work
  2777. comfortably with the normal Shell.
  2778.  
  2779. If there are enough people asking for that, I will think about writing
  2780. such a "multi-command-file", but I will not write another console-handler.
  2781.  
  2782. And, last but not least, I have to invest lots of time in my studies and
  2783. I do not want to hang around all remaining time at the keyboard !
  2784. ============================================================================
  2785. Distribution
  2786.  
  2787. Following files belong to this document:
  2788.  1) ZShell           The main executable
  2789.  2) ZSH              The small starter
  2790.  3) ZShell.doc       The documentation (and online help manual)
  2791.  4) ZShell.guide     The AmigaGuide documentation
  2792.  5) ReadMe           Short description
  2793.  6) ZStart           An example startup script (can be put in S: )
  2794.  7) ZShell.s         Source code of the main executable
  2795.  8) ZSH.s            Source code of the small starter
  2796.  9) Csh-Aliases      Some aliases to make it a bit similar to UNICS csh
  2797.  and some icons.
  2798. ============================================================================
  2799. Copyright
  2800.  
  2801. COPYRIGHT
  2802. (taken directly from the V1.3 distribution from Paul Hayter)
  2803.  
  2804.  ZSHELL IS FREELY DISTRIBUTABLE. YOU CAN DISTRIBUTE THIS AS LONG AS
  2805.  THIS DOC FILE REMAINS WITH THE EXECUTABLE, AND THAT NO CHARGE IS MADE FOR
  2806.  THEM (APART FROM A NOMINAL COPYING CHARGE). IF YOU FEEL LIKE SENDING
  2807.  ME SOMETHING FOR THIS PROGRAM, SEND ME A POSTCARD!, A P.D. DISK, A
  2808.  PROGRAM YOU'VE BEEN WORKING ON ,BUT DON'T SEND ME ANY MONEY (WELL, IF
  2809.  YOU REALLY, REALLY WANT TO, I GUESS I COULD PUT UP WITH IT).
  2810.  
  2811. Note from Martin:
  2812.  
  2813.  This is an update to Version 1.3 on the Fish Library Disk 537 from
  2814.  Paul Hayter. I (Martin) tried to ask him for permission to release
  2815.  this, but he has not answered. Because the copyright notice is left
  2816.  unchanged and the original executable with documentation is included,
  2817.  I do not think that I am doing something nasty.
  2818.  (In the original distribution there was the source code included
  2819.  and there is nothing stated to distribute it only unmodified.)
  2820.  
  2821.  To make things easier I accept the same copyright notice for the parts
  2822.  I have written. They are marked in the source with V2.x (well, mostly).
  2823.  I estimate that about 70% of the source, executable and the documentation
  2824.  is from me.
  2825.  
  2826.  I would like to get your comment on ZShell to see if anybody is
  2827.  using it and what can be improved.
  2828. ============================================================================
  2829. Disclaimer
  2830.  
  2831. DISCLAIMER
  2832.  
  2833. USE THE FILES OF THIS PACKAGE ON YOUR OWN RISK !
  2834. The authors are in no way responsible for what you are doing with it
  2835. or what it does to you or your soft- and hardware.
  2836.  
  2837. Amiga, AmigaDOS, AmigaGuide, Workbench and Kickstart were registered
  2838. trademarks of Commodore-Amiga Inc and now probably are of ESCOM AG.
  2839. MessyDOS and UNICS are not really trademarks (as I know)  :-)
  2840. ============================================================================
  2841. Credits
  2842.  
  2843. CREDITS FROM PAUL
  2844.  
  2845.  Many thanks to Wayne for his invaluable help in doing the history
  2846.  and command line editing parts of ZShell. Also, thanks to
  2847.  Tim Strachan who asked for the history stuff.
  2848.  
  2849.  ZShell was entirely written using Wayned by Wayne Hayter (various
  2850.  versions). And was assembled with A68K V2.61 by Charlie Gibbs. And
  2851.  linked with Blink V6.7 by the Software Distillery.
  2852.  
  2853. CREDITS FROM MARTIN
  2854.  
  2855.  Many thanks go to:
  2856.  
  2857.  * The administrators of Aminet for their great work
  2858.  * Samu Nuojua for his great Freeware assembler SNMA
  2859.    ZShell V2.8 was assembled with V1.99: SNMA ZShell.S EXEOBJ OPTLEVEL 5
  2860.  * Ralph Babel for the System0 code (see source)
  2861.  * Martin Mares for some fine assembler programs
  2862.  * Frank for using ZShell (I persuaded him :-)
  2863.  (V2.0)
  2864.  * Laura Mahoney for trying to send me a postcard and lots of mail
  2865.  * Igor Srdanovic
  2866.  * Willem MC Hogeweg
  2867.  (V2.1)
  2868.  * Nico Max
  2869.  * Max Stouugard
  2870.  * Alexandros Loghis for good ideas
  2871.  (V2.2)
  2872.  * Christian Steigies for sending me postcards, for really long mails,
  2873.    for lots of shocking bugreports :) and for betatesting
  2874.  * Oliver Hofmann
  2875.  * Holger Jakob
  2876.  * Hans Kruse
  2877.  (V2.3)
  2878.  * Nobody !
  2879.  (V2.4)
  2880.  * Aristotelis Grammatikakis
  2881.  * Jonathan Marsh
  2882.  * Dominique Niethammer
  2883.  * Fredrik Solenberg
  2884.  * Teonanacatl
  2885.  * Chris
  2886.  * Fred Brooker for the music disk
  2887.  * David Klinect
  2888.  * Brian Myers
  2889.  (V2.5)
  2890.  * Timothy Cochran for rewriting the documentation (not finished)
  2891.  * Mark Dowe
  2892.  * Marek Petkov
  2893.  * Matthew Estela
  2894.  * Christian Hessenbruch
  2895.  (V2.7)
  2896.  * Bill Beogelein
  2897.  * Louis Van Breda for reporting Enforcer hits
  2898.  * Peter Bagnato
  2899.  * Peter Schulz
  2900. ============================================================================
  2901. Authors
  2902.  
  2903. Please send any correspondence and/or bug reports referring V1.3
  2904. to me at the address below:-
  2905.  
  2906.       Paul Hayter
  2907.       PO Box 331
  2908.       Ballina
  2909.       2478
  2910.       AUSTRALIA
  2911.  
  2912. Please send correspondence, bug reports, comments, suggestions
  2913. for future improvements etc. referring V2.x to this adress:
  2914.  
  2915.       Martin Gierich
  2916.       Narzissenweg 7
  2917.       76297 Stutensee
  2918.       GERMANY
  2919.  
  2920.   (I would really like to get a picture postcard from you, even if
  2921.   you just wrote a "Hello" on it !)
  2922.  
  2923.   If you have EMAIL access, it would be nice if you send me one
  2924.   at one of these adresses:
  2925.  
  2926.            uj3w@rz.uni-karlsruhe.de           (Internet)
  2927.    or to   uj3w@ibm3090.rz.uni-karlsruhe.de   (Internet)
  2928.    or to   UJ3W@DKAUNI2.BITNET                (Bitnet)
  2929.  
  2930.   I will try to reply EVERY EMail I get !
  2931.  
  2932.   Please tell me your system-configuration, at least your Kickstart-
  2933.   Version, so that I see which kind of systems should be most supported
  2934.   in future versions. My system is an A500 with 200 MB Harddisk, 3 MB RAM,
  2935.   Kickstart 2.04 and Workbench 2.1 and a VGA-Monitor with Fickerfixer.
  2936.   Note that large parts of ZShell were developped under Kickstart 1.3 !
  2937.   (Ah yes, and I have such a Vortex ATONCE AT-Emulator; the fastest thing
  2938.   it can do is to hang itself up, and they do not make any updates !)
  2939.  
  2940.       /\/\            o o
  2941.      / __ \ artin      <
  2942.     (_/  \_)         `---'
  2943. ============================================================================
  2944.